I have a file in my GitHub repository that I would like to remove from my previous commits. I used BFG Repo-Cleaner's delete-files
command and it appeared to work, but when I go on my GitHub repository the file is still on all the previous commits. If I try and do the command again, it gives me a
BFG aborting: No refs to update - no dirty commits found??
Am I misunderstanding how BFG works? If so how can I remove the file from my past commits on GitHub?
Here are the steps I took:
- Cloned a copy of my GitHub repo into a local folder using the
--mirror
flag. - I then
cd
to my local visual studio project. - I then entered in the command
java -jar bfg-1.12.1.13.jar --delete-files <.json file I wanted to delete> <my local clone copy from step 1>.git
- I then entered in
git reflog expire --expire=now --all && git gc --prune=now --aggressive
- Ran
git push