On Wednesday, July 10, 2013 10:30:46 PM UTC+2, Larry Martell wrote:

> I accidentally committed some large files, and when I pushed I got:
> remote: Error code: b68f56c6735645b9d397abe957c294d7
> remote: warning: Error GH413: Large files detected.
> remote: warning: See http://git.io/iEPt8g for more information.
> remote: error: File app/cdsem/fixtures/cdsem_event_message_idx.json is 
> 1162.76 MB; this exceeds GitHub's file size limit of 100 MB
> remote: error: File app/cdsem/fixtures/data_cst.json is 420.92 MB; this 
> exceeds GitHub's file size limit of 100 MB
> remote: error: File app/cdsem/fixtures/data_eventlog.json is 2536.31 MB; 
> this exceeds GitHub's file size limit of 100 MB
> To https://larrymart...@github.com/sobelk/MOTOR.git
>  ! [remote rejected] unit_test -> unit_test (pre-receive hook declined)
> error: failed to push some refs to '
> https://larrymart...@github.com/sobelk/MOTOR.git'
> This was the first push for a new branch - I thought the push was done, 
> just without these files, but it seems the brach was not created at all. 
> I followed the directions at http://git.io/iEPt8g and did this:
> $ git rm --cached app/cdsem/fixtures/cdsem_event_message_idx.json 
> app/cdsem/fixtures/data_cst.json app/cdsem/fixtures/data_eventlog.json
> rm 'app/cdsem/fixtures/cdsem_event_message_idx.json'
> rm 'app/cdsem/fixtures/data_cst.json'
> rm 'app/cdsem/fixtures/data_eventlog.json'
> $ git commit --amend -CHEAD
> [unit_test e8d0629] added more MeasData tests
>  4 files changed, 121616635 deletions(-)
>  delete mode 100644 app/cdsem/fixtures/cdsem_event_message_idx.json
>  delete mode 100644 app/cdsem/fixtures/data_cst.json
>  delete mode 100644 app/cdsem/fixtures/data_eventlog.json
> Then I tried another push, but I got the same errors as before. How I can 
> remove these files from the commit so I can push my branch?

I suspect that you haven't really removed the big files from history. Do a git 
log --name-status and have a good look to see if the big files were added 
(A) in any commits. Perhaps they were added in an earlier commit (their fix 
will only work if the files were added in the very last commit).

If you do find an older [commit-id] where they were added, do an 
interactive rebase back to the commit (git rebase -i [commit-id]~1) and 
select that you want to edit the commit. Remove the files from the old 
commit, and check git log again to make sure there's no trace of the big 
files in your history. Then try pushing again.

If still at loss, you better take this up with GitHub.  You can contact 
them via their 'contact a human' button at the bottom of the page.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to