2

I made a bit of a mess when I thoughtlessly tried to commit a large file to github. Now I can't commit anything because git still tries to add the file.

I'm getting the following:

Counting objects: 39, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (39/39), done.
Writing objects: 100% (39/39), 262.40 MiB | 1.33 MiB/s, done.
Total 39 (delta 18), reused 0 (delta 0)
remote: warning: File VR_video_test/R0010508.MP4 is 60.67 MB; this is
 larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected.
remote: error: Trace: 8245456222332dd337864ff6a0c27870
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File VR_video_test/R0010508.MP4 is 263.34 MB; this
exceeds GitHub's file size limit of 100.00 MB
To [email protected]:johncap/webGL-learning.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:johncap/webGL-learning.git' 

Yesterday I tried to upload a large file to a repo called VR_video_test. The commit failed. I removed the video and tried again, deleting the repo and creating a new one called VR_video_test_no_video.

Now I'm noticing that I can't commit any more changes even when I'm in a totally different repo (as in the error noted above, I'm in a repository called WebGL-learning."

I deleted both VR_video_test repos from my local and remote repositories, so I don't understand why WebGL-learning thinks I'm trying to upload a video to VR_video_test.

Can anyone help me fix this?

I tried a few things: http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#The-Nuclear-Option%3a-filter-branch

Which yields the result:

fatal: Not a git repository (or any of the parent directories): .git

I also tried:

git rm --cached VR_video_test/R0010508.MP4

git rm --cached VR_video_test_no_video/R0010508.MP4

git rm --cached R0010508.MP4

And I get the error:

fatal: pathspec 'VR_video_test/R0010508.MP4' did not match any files

I don't know how to fix this issue or how to even access the repos now that they're deleted.

Can anyone help?

1
  • Are you commiting the descendent of the commit(s) that include your .MP4? A push to the remote repo means you are uploading every changes you had in the branch, including the deleted files. Commented Sep 15, 2015 at 6:09

1 Answer 1

1

Try first to clone [email protected]:johncap/webGL-learning.git, add a commit and push to see if the issue persists.

If it does (and the file isn't visible in the worktree), that would mean it is part of the history of the repo.
In that case, try the BFG repo cleaner in order to detect and automatically remove any large file.

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

1 Comment

OK, this was a good solution for me. I cloned the repo, committed my changes, and deleted the old one. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.