1

I tried to delete one file from git history. I am able to delete that file from local and did the forsce push for all branches

my cli are:

java -jar bfg-1.13.1.jar --delete-files "{config.js}" --no-blob-protection my-repo.git
git reflog expire --expire=now --all
git gc --prune=now --aggressive

After these executions, I did force push for all branches by Git push --force

when I try to git checkout commitId(which include deleted file changes) It gives "fatal: reference is not a tree: commitId" Means That commit id not present in local.

But

I Can see that commit id in GitHub event after two days(time for git carbage collection ) by https://github.com/project/repo/commit/commitId

Means, That commitId is not updated/removed in remote. I need to remove this commit even from the remote also. How we can do it?

jiz
  • 308
  • 3
  • 7
  • 2
    Unfortunately you can't. You don't have complete control over the remote repo so you can't force it to GC. If you want it ASAP, the only solution might be to delete and recreate the repository on GitHub. – iBug Jan 17 '21 at 09:09
  • 2
    You'll need to contact support or recreate the repo on GitHub. – jessehouwing Jan 17 '21 at 09:56

0 Answers0