I have a valid git repository. I accidentally added a big file inside one of the subfolder inside my git repository. Now I cannot push changes. However, when using BFG Repo-Cleaner with the following command I get an error.
java -jar /Users/arjanhada/bfg-1.12.15.jar -b 100M Udacity-Data-Analyst.git
Aborting : Udacity-Data-Analysis.git is not a valid Git repository.
Did you change directory to where Udacity-Data-Analyst.git is located?
No, I did not change to Udacity-Data-Analyst. However, that folder is right inside my home directory.
OK - did you read something somewhere that indicated that Git repos would be automatically found in your home directory versus current working directory? If so that should be corrected.
You need to cd to your home directory first.
This issue should be closed.
I actually ran the command from my home directory.
java -jar /Users/arjanhada/bfg-1.12.15.jar -b 100M Udacity-Data-Analyst.git
The folder Udacity-Data-Analyst is right inside my home directory. Sorry for the confusion. I actually resolved the issue using git-filter-branch. The BFG Repo-Cleaner did not work at all.
Hello all,
I came accross this thread and thought I'd add a contribution even if it is 3 years old.
I beleive the command should be something like this:
java -jar C:/Users/arjanhada/bfg-1.12.15.jar -b 100M C:/Users/arjanhada/Udacity-Data-Analyst
The path is to wherever the local project is located (without the .git extension)
One the local git commits are cleaned they should be pushed to github.
Hope this helps someone.
Most helpful comment
Hello all,
I came accross this thread and thought I'd add a contribution even if it is 3 years old.
I beleive the command should be something like this:
java -jar C:/Users/arjanhada/bfg-1.12.15.jar -b 100M C:/Users/arjanhada/Udacity-Data-Analyst
The path is to wherever the local project is located (without the .git extension)
One the local git commits are cleaned they should be pushed to github.
Hope this helps someone.