Reputation: 5204
I tried pushing a commit to GitHub that failed due to a large file. I deleted the file and committed again, not realizing I should use the git rm command for this. Now when I try to push files I still get the file is too large error, but the file itself does not exist. Furthermore, git ls-files
shows that the file is not tracked any longer by the repo. I cannot use git checkout <filename>
or git rm <filename>
for this reason.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 802e29a8219057c442d92cc51df68216
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File IN00148939/__CS__/CS601-patch.exe is 176.56 MB; this exceeds GitHub's file size limit of 100.00 MB
$ git ls-files | grep IN001
IN00148939/README.md
IN00148939/__CS__/Dir.txt
IN00148939/missing_scroll/analystpicker.php
IN00148939/missing_scroll/html/webclient/client/forms/_system/assigntree/analystpicker.php
IN00148939/missing_scroll/html/webclient/client/forms/_system/assigntree/tree.css
IN00148939/missing_scroll/setup.yml
IN00148939/missing_scroll/tree.css
IN00148939/setup.yml
Upvotes: 1
Views: 740
Reputation: 5204
Taking tadman's advice I tried undoing my commit with
git reset HEAD~3
when that didn't work, I copied all my files to a new folder and did a hard reset
git fetch --all
git reset --hard origin/master
Then I copied my repo back over to the newly reset repo and did a new commit. That fixed the issue.
Upvotes: 1