14

When trying to push, I get a fatal error because git is trying to include a file that is too large for GitHub. git rm file fails because the file doesn't exist (it has existed, but no longer does). Git seems to refuse to acknowledge that the file is gone.

What should I do?


For information, the error message I get is:

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

If the above is as impossible to achieve as it seems, instructions on how to just torch all the git related stuff here and set it up from scratch with code that we have preserved in backup directories would be great. We really don't have time to mess around with git anymore...

2
  • possible duplicate of Error while pushing to github repo Commented Dec 17, 2014 at 17:26
  • Yeah, it looks like the same issue. I lost patience with git and just started fresh. I wish there was a sane newbie introduction to git somewhere. Oh well. Commented Dec 18, 2014 at 13:16

1 Answer 1

1

Run git rm --cached file even if the file does not exist anymore. This way, the file will be removed from the index.

If you are looking to completely eradicating the file from Git history, you will need some git filter-branch-fu instead.

Sign up to request clarification or add additional context in comments.

7 Comments

git rm --cached file fails the same way as git rm file. "fatal: pathspec file did not match any file".
Your problem appears to be slightly different. You have already removed the file with git rm but your history has grown too large, right?
I believe (but am not sure) that the file was removed by some other process (it was a temp file). The complaint I get when trying to push is that this specific file is too large to push to github.
I really only see one proposed solution, and it fails because git rm --cached filename fails.
I'm not sure how that works. Following the instructions on the page, I have created a new local clone, and run BFG on that. Pushing the old clone still fails (which seems natural). I don't want to lose the changes I've made since the last successful push, but I don't want to lose others' changes either.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.