Re: [git-users] Re: Problem removing large files from commit
On Sat, Jul 13, 2013 at 4:07 PM, Thomas Ferris Nicolaisen wrote: > >> I hope I can recover these changes from backups - if not I've lost >> quite a bit of work. > > > First of all, no matter how much you rebase around, Git will not throw away > old history in a repository. No doubt that is true, but I just didn't have the time to mess around with this. This is a very active project for a client and I had to forge ahead. I was able to get most of my changes from backup and I only lost work from that morning, which I was easily able to recreate. > Have a good look through the reflog to find > your last known stable point, and then do a git reset --hard to this point. > Read this: http://effectif.com/git/recovering-lost-git-commits Thanks. This looks useful - I'll save it for future reference (which I hope I'll never need ;-) > Now, going back to the original idea, using git rebase --interactive, you > better read up on how it works a bit before you try again. > https://help.github.com/articles/interactive-rebase Wish I had read that before. I did read the man page, but it wasn't all that helpful Thanks! -larry -- 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.
Re: [git-users] Re: Problem removing large files from commit
> I hope I can recover these changes from backups - if not I've lost > quite a bit of work. > First of all, no matter how much you rebase around, Git will not throw away old history in a repository. Have a good look through the reflog to find your last known stable point, and then do a git reset --hard to this point. Read this: http://effectif.com/git/recovering-lost-git-commits Now, going back to the original idea, using git rebase --interactive, you better read up on how it works a bit before you try again. https://help.github.com/articles/interactive-rebase -- 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.
Re: [git-users] Re: Problem removing large files from commit
On Thu, Jul 11, 2013 at 9:19 AM, Larry Martell wrote: > On Thu, Jul 11, 2013 at 7:47 AM, Larry Martell > wrote: >> On Thu, Jul 11, 2013 at 6:10 AM, Thomas Ferris Nicolaisen >> 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. Things are going from bad to worse. I tried again, and edited the reba
Re: [git-users] Re: Problem removing large files from commit
On Thu, Jul 11, 2013 at 7:47 AM, Larry Martell wrote: > On Thu, Jul 11, 2013 at 6:10 AM, Thomas Ferris Nicolaisen > 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
Re: [git-users] Re: Problem removing large files from commit
On Thu, Jul 11, 2013 at 6:10 AM, Thomas Ferris Nicolaisen 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. > 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. Thanks! -larry -- 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.
[git-users] Re: Problem removing large files from commit
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? > You can also try running the BFG Repo Cleaner: http://rtyley.github.io/bfg-repo-cleaner/ -- 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.
[git-users] Re: Problem removing large files from commit
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.
[git-users] Re: Problem removing large files from commit
Hey there. Not sure if this helps you, but this guide seems to be the best authority for removing files from the repository https://help.github.com/articles/remove-sensitive-data On Wednesday, July 10, 2013 3:30:46 PM UTC-5, 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? > > Thanks! > -larry > -- 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.