On Thu, Jul 11, 2013 at 7:47 AM, Larry Martell <larry.mart...@gmail.com> wrote:
> On Thu, Jul 11, 2013 at 6:10 AM, Thomas Ferris Nicolaisen
> <tfn...@gmail.com> wrote:
>> 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).
>
> Yes, that was the case - the big files were committed in my first
> push. They show as being deleted in a later commit, but that seems to
> not have worked. What's disturbing is that on github the branch
> doesn't exist at all.
>
>> 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.
>
> I ran git rebase as you suggested and it brought up a file in vi with
> a list of commits and commands. Wasn't sure exactly what it wanted me
> to do, so I put e (for edit) in front of the commit I wanted to edit.
> When I exited vi I got:
>
> fatal: Needed a single revision
> Invalid commit name: pick
>
> I tried to do it again and got:
>
> It seems that there is already a rebase-merge directory, and
> I wonder if you are in the middle of another rebase.  If that is the
> case, please try
>         git rebase (--continue | --abort | --skip)
> If that is not the case, please
>         rm -fr "/usr/local/motor/motor/.git/rebase-merge"
> and run me again.  I am stopping in case you still have something
> valuable there.
>
> I tried rebase --continue and got:
>
> error: could not apply 7593c5b... first working unit test
>
> When you have resolved this problem, run "git rebase --continue".
> If you prefer to skip this patch, run "git rebase --skip" instead.
> To check out the original branch and stop rebasing, run "git rebase --abort".
> Could not apply 7593c5b... first working unit test
>
> Then I did git rebase --abort and got:
>
> No rebase in progress?
>
> If I now do a status it says I'm 'Not currently on any branch' and it
> shows 3 files as 'deleted by us' - these are not the big files and are
> not files I want to delete. If I try and switch to another branch I
> git:
>
> error: you need to resolve your current index first
>
>
> How do I get out of this mess now and at least back to where I was
> before. I need to switch branches to work on something else.

I was able to do git reset HEAD and then checkout another branch. So
I'm back to my original situation. Clearly I was using rebase
incorrectly, so if you have any more guidance on that, I'd really
appreciate it.

>> 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.
>
> Yes, I did that 2 days ago and I did not get any response.

-- 
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