I received an interesting error a couple days ago when I tried to push to GitHub:

remote: error: File dumpfile.sql is 118.57 MB; this exceeds GitHub's file size limit of 100 MB

It turns out that I accidentally committed a MySQL dump file that I grabbed from our development server. GitHub only allows for 100 MB file which is totally understandable but now I'm stuck with a 118 MB file in my repo with no way to push it to GitHub. It turns out with some command line fu you can remove a file completely from a repo:

git filter-branch --index-filter 'git rm --cached --ignore-unmatch dumpfile.sql' merge-point..HEAD

At which point you can push the file to GitHub.

Update 2017-07-29

So I added a new file to a repo today and it turns out GitHub changed from 100 MB to 50 MB. I've updated the title and included this so hopefully people will find it.

remote: warning: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

remote: warning: See http://git.io/iEPt8g for more information.

remote: warning: File initial.sql.gz is 98.65 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB

Like this post? Don't forget to follow us on Twitter and Facebook for updates.