{"thread":{"id":"36255","subject":"Lost commit during rebase!","startedAt":"2014-03-20T19:37:12Z","lastAt":"2014-03-20T19:41:15Z","messageCount":2,"participants":["Robert Dailey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"237198","messageId":"CAHd499CBkuCJvZ+U3GEcnw0UFot5JooZVdj2sHT_3p0s6ScwcQ@mail.gmail.com","threadId":"36255","inReplyTo":null,"subject":"Lost commit during rebase!","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-03-20T19:37:12Z","receivedAt":"2014-03-20T19:37:12Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"I have a local-only branch with just under 70 commits. I also have\nmerge commits on this branch.\n\nThe log of the top few commits on my branch looks like so:\n\n* de651ff       (20 minutes ago) (HEAD, survey) Robert Dailey - WIP:\nGOTO implementation\n* 2a68a23       (21 minutes ago) Robert Dailey - Move boost::phoenix\ninclude & namespace changes to own header file\n* e1cd568       (19 hours ago) Robert Dailey - WIP: GOTO flow changes\n* b039bb5       (19 hours ago) Robert Dailey - Remove superfluous\ninclude of own header\n* 4bdeb27       (20 hours ago) Robert Dailey - Rename NavigateBackwards()\n\nI had two commits that I wanted to squash and also reorder another\none. The command I ran is:\n\ngit rebase -pi `git merge-base origin/master survey`\n\nI ran this command with 'survey' branch checked out. Once my editor\nappears, the last few commits in the file look like so:\n\npick 4bdeb27 Rename NavigateBackwards()\npick b039bb5 Remove superfluous include of own header\npick e1cd568 WIP: GOTO flow changes\npick 2a68a23 Move boost::phoenix include & namespace changes to own header file\npick de651ff WIP: GOTO implementation\n\nI modify the last 3 commits in the file so now it looks like this:\n\npick 4bdeb27 Rename NavigateBackwards()\npick b039bb5 Remove superfluous include of own header\npick 2a68a23 Move boost::phoenix include & namespace changes to own header file\npick e1cd568 WIP: GOTO flow changes\nsquash de651ff WIP: GOTO implementation\n\nWhat I did was:\n\n1. Move 2a68a23 back one commit\n2. Mark de651ff for squash\n\nAfter this, I save the file, close, and rebase operations begin. After\nthe rebase is done, my log looks like this:\n\n* 94d06df       (19 hours ago) (HEAD, survey) Robert Dailey - WIP:\nGOTO flow changes\n* b039bb5       (19 hours ago) Robert Dailey - Remove superfluous\ninclude of own header\n* 4bdeb27       (20 hours ago) Robert Dailey - Rename NavigateBackwards()\n\nNotice that the commit with description \"Move boost::phoenix include &\nnamespace changes to own header file\" is missing! I looked at reflog:\n\n$ git reflog\n94d06df HEAD@{0}: rebase -i (finish): returning to refs/heads/survey\n94d06df HEAD@{1}: rebase -i (squash): WIP: GOTO flow changes\ne1cd568 HEAD@{2}: rebase -i (pick): updating HEAD\n2a7b27a HEAD@{3}: rebase -i (pick): Move boost::phoenix include &\nnamespace changes to own header file\nb039bb5 HEAD@{4}: rebase -i (pick): updating HEAD\n4bdeb27 HEAD@{5}: rebase -i (pick): updating HEAD\n2e40bcd HEAD@{6}: rebase -i (pick): updating HEAD\n3ca6bb3 HEAD@{7}: rebase -i (pick): updating HEAD\ne63b1e5 HEAD@{8}: rebase -i (pick): updating HEAD\n4d40c00 HEAD@{9}: rebase -i (pick): updating HEAD\nec078c1 HEAD@{10}: rebase -i (pick): updating HEAD\nde48c5d HEAD@{11}: rebase -i (pick): updating HEAD\n\nIt shows that it \"picked\" the commit that's missing now. Is this a bug\nor am I not doing something right? I'm using Git for Windows version\n1.9.0\n"},{"id":"237200","messageId":"CAHd499AM5niunTURoop+JspxMgBwhWY8upRpo5RU-gux7+BZ8A@mail.gmail.com","threadId":"36255","inReplyTo":"CAHd499CBkuCJvZ+U3GEcnw0UFot5JooZVdj2sHT_3p0s6ScwcQ@mail.gmail.com","subject":"Re: Lost commit during rebase!","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-03-20T19:41:15Z","receivedAt":"2014-03-20T19:41:15Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"Sorry it looks like I missed some basic documentation:\nhttp://git-scm.com/docs/git-rebase\n\nThis issue (combining preserve merges with interactive option) is\ndescribed in the BUGS section.\n\nIs there a way I can go about this without losing my merge commits?\n\nOn Thu, Mar 20, 2014 at 2:37 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> I have a local-only branch with just under 70 commits. I also have\n> merge commits on this branch.\n>\n> The log of the top few commits on my branch looks like so:\n>\n> * de651ff       (20 minutes ago) (HEAD, survey) Robert Dailey - WIP:\n> GOTO implementation\n> * 2a68a23       (21 minutes ago) Robert Dailey - Move boost::phoenix\n> include & namespace changes to own header file\n> * e1cd568       (19 hours ago) Robert Dailey - WIP: GOTO flow changes\n> * b039bb5       (19 hours ago) Robert Dailey - Remove superfluous\n> include of own header\n> * 4bdeb27       (20 hours ago) Robert Dailey - Rename NavigateBackwards()\n>\n> I had two commits that I wanted to squash and also reorder another\n> one. The command I ran is:\n>\n> git rebase -pi `git merge-base origin/master survey`\n>\n> I ran this command with 'survey' branch checked out. Once my editor\n> appears, the last few commits in the file look like so:\n>\n> pick 4bdeb27 Rename NavigateBackwards()\n> pick b039bb5 Remove superfluous include of own header\n> pick e1cd568 WIP: GOTO flow changes\n> pick 2a68a23 Move boost::phoenix include & namespace changes to own header file\n> pick de651ff WIP: GOTO implementation\n>\n> I modify the last 3 commits in the file so now it looks like this:\n>\n> pick 4bdeb27 Rename NavigateBackwards()\n> pick b039bb5 Remove superfluous include of own header\n> pick 2a68a23 Move boost::phoenix include & namespace changes to own header file\n> pick e1cd568 WIP: GOTO flow changes\n> squash de651ff WIP: GOTO implementation\n>\n> What I did was:\n>\n> 1. Move 2a68a23 back one commit\n> 2. Mark de651ff for squash\n>\n> After this, I save the file, close, and rebase operations begin. After\n> the rebase is done, my log looks like this:\n>\n> * 94d06df       (19 hours ago) (HEAD, survey) Robert Dailey - WIP:\n> GOTO flow changes\n> * b039bb5       (19 hours ago) Robert Dailey - Remove superfluous\n> include of own header\n> * 4bdeb27       (20 hours ago) Robert Dailey - Rename NavigateBackwards()\n>\n> Notice that the commit with description \"Move boost::phoenix include &\n> namespace changes to own header file\" is missing! I looked at reflog:\n>\n> $ git reflog\n> 94d06df HEAD@{0}: rebase -i (finish): returning to refs/heads/survey\n> 94d06df HEAD@{1}: rebase -i (squash): WIP: GOTO flow changes\n> e1cd568 HEAD@{2}: rebase -i (pick): updating HEAD\n> 2a7b27a HEAD@{3}: rebase -i (pick): Move boost::phoenix include &\n> namespace changes to own header file\n> b039bb5 HEAD@{4}: rebase -i (pick): updating HEAD\n> 4bdeb27 HEAD@{5}: rebase -i (pick): updating HEAD\n> 2e40bcd HEAD@{6}: rebase -i (pick): updating HEAD\n> 3ca6bb3 HEAD@{7}: rebase -i (pick): updating HEAD\n> e63b1e5 HEAD@{8}: rebase -i (pick): updating HEAD\n> 4d40c00 HEAD@{9}: rebase -i (pick): updating HEAD\n> ec078c1 HEAD@{10}: rebase -i (pick): updating HEAD\n> de48c5d HEAD@{11}: rebase -i (pick): updating HEAD\n>\n> It shows that it \"picked\" the commit that's missing now. Is this a bug\n> or am I not doing something right? I'm using Git for Windows version\n> 1.9.0\n"}]}