rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
10.86k stars 535 forks source link

git describe gives a much older version after running BFG unsuccessfully #381

Open gituser703 opened 4 years ago

gituser703 commented 4 years ago

I ran the bfg --delete-files <fileName.extension> <git repo name>.git command to delete commit history for a file in my git repo. After the successful execution of the delete command, bfg report was created along with the map of old and new commit ids. After this, I ran git reflog expire --expire=now --all && git gc --prune=now --aggressive followed by git push. However, git push did not succeed completely and I saw warnings like remote rejected.

Now the issue is that the push worked on few commits and did not work on few other commits. When I try git describe, all the old commits that were existing before I ran the bfg tool are pointing to some older version x which was created like two years ago. The newer commit ids created by bfg point to the newer version, while some do not.

Can some one please help me resolve this issue. Will running bfg again help? Or how do I get the correct version for all my older commit ids ie, the commit ids before running the bfg tool.

gituser703 commented 4 years ago

@rtyley, can you please check the above issue?

ymartin59 commented 4 years ago

What does git fsck answer?