Can't push to GitHub because of large file which I already deleted

The Solution to Can't push to GitHub because of large file which I already deleted is


You can use

git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch <file/dir>' HEAD

This will delete everything in the history of that file. The problem is that the file is present in the history.

This command changes the hashes of your commits which can be a real problem, especially on shared repositories. It should not be performed without understanding the consequences.

~ Answered on 2014-05-14 14:36:58


Most Viewed Questions: