You have already performed a filter-branch operation. After filter-branch, Git keeps refs to the old commits around, in case something goes wrong.
You can find those in .git/refs/original/…
. Either delete that directory and all files within, or use the -f
flag to force Git to delete the old references.
git filter-branch -f \
--index-filter 'git rm --cached --ignore-unmatch Rakefile' HEAD
Use this command to remove original backup:
git update-ref -d refs/original/refs/heads/master
Here is gist I used to filter-branch my git repo: https://gist.github.com/k06a/25a0214c98bc19fd6817
I had the same problem and the answer above didn't fix it. There was no .git/refs/original/ directory left. The solution for me was to delete the .git/packed-refs file.
Add a force to the filter branch command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With