Friday, February 21, 2014

Nasty Github Error

What I did:

1) Starting profiling my node.js application
2) V8.log exceede > 200MB.
3) Added the file
4) Commited.
5) Tried > git push
6) Yikes!!

Error :

remote: error: GH001: Large files detected.
remote: error: Trace: 5d65fdfa2bb0cdbc12b681a5d82e2d0a
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File v8.log is 243.09 MB; this exceeds GitHub's file size limit of 100 MB
To https://github.com/
xxxxxx.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/xxxxxx.git'

 I went crazy for hours.

Finally I got a solution:

 git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch v8.log'


Thanks to http://stackoverflow.com/questions/21168846/cant-remove-file-from-git-commit/21169552#21169552