Reputation: 1105
I have a file too large to git push
, and I blindly did a lot operations which later proved to be in vain. Therefore, it is hard to keep track on what I have done to solve this problem.
I have tried something based on other posts, but after hitting bumps continuously, I deleted the large file from local directory and stored it somehwhere else. But when it comes to doing git push
, it still reports,
remote: Resolving deltas: 100% (12/12), completed with 7 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c97c02f1e5c63de116140671bb54f0be
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File base_2019-07-29-19-04-00/val_loss_checkpoint.hdf5 is 202.28 MB; this exceeds GitHub's file size limit of 100.00 MB
I thought git
recorded something even though the file is not in the local repo any more. So I tried to remove the file by doing,
$ git rm --cached base_2019-07-29-19-04-00/val_loss_checkpoint.hdf5
fatal: pathspec 'base_2019-07-29-19-04-00/val_loss_checkpoint.hdf5' did not match any files
I am rather confused to understand what is going on and waiting for some advice. Thanks.
Upvotes: 0
Views: 61
Reputation: 2063
If you run git status
, I'm guessing you see something like this:
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: base_2019-07-29-19-04-00/val_loss_checkpoint.hdf5
I think the command in parentheses on the third line is what you're looking for:
git reset HEAD base_2019-07-29-19-04-00/val_loss_checkpoint.hdf5
Note the git rm
both deletes the file AND updates the git staging area. Since you've already deleted the file manually, use git reset
to interact with the staging area alone.
Upvotes: 1