{"thread":{"id":"18332","subject":"git-svn rebase can change branches during merge?","startedAt":"2009-03-16T20:49:35Z","lastAt":"2009-03-17T04:34:44Z","messageCount":3,"participants":["Kevin Williams","Jan Krüger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"108137","messageId":"683a886f0903161349k172679a6t24cc4e393aea8f2d@mail.gmail.com","threadId":"18332","inReplyTo":null,"subject":"git-svn rebase can change branches during merge?","fromName":"Kevin Williams","fromEmail":"kevwil@gmail.com","sentAt":"2009-03-16T20:49:35Z","receivedAt":"2009-03-16T20:49:35Z","isPatch":false,"sender":{"key":"kevwil@gmail.com","avatar":"https://gravatar.com/avatar/a5087ab27d9fbcda120c6bdfa737a4b7c81172f98eb1c1774e9c96514f570fbd?d=mp&s=160"},"body":"I've outlined steps where I can reproduce this bug here:\nhttp://gist.github.com/80058\n\nWhen using \"git svn rebase\" and there is a conflict between a local\n(git) change and an upstream (svn) change, the local git repository is\nleft in a ghost-branch. It shouldn't change branches during a rebase,\nshould it? I also seem to be unable to recover from the merge\nconflict, but that may be just due to the noob at the keyboard (me).\n\nI tried working through this with some folks in the #git channel last\nweek but they were stumped as well.\n\nI'm using the latest Git build from MacPorts (1.6.2.1 as of today) on\na MacbookPro with OS X 10.5.6 (fully updated with all patches)\n\n-- \nCheers,\n\nKevin Williams\n"},{"id":"108156","messageId":"20090316233641.248f2e81@perceptron","threadId":"18332","inReplyTo":"683a886f0903161349k172679a6t24cc4e393aea8f2d@mail.gmail.com","subject":"Re: git-svn rebase can change branches during merge?","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2009-03-16T22:36:41Z","receivedAt":"2009-03-16T22:36:41Z","isPatch":false,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"Hi Kevin,\n\n> I've outlined steps where I can reproduce this bug here:\n> http://gist.github.com/80058\n> \n> When using \"git svn rebase\" and there is a conflict between a local\n> (git) change and an upstream (svn) change, the local git repository is\n> left in a ghost-branch. It shouldn't change branches during a rebase,\n> should it? I also seem to be unable to recover from the merge\n> conflict, but that may be just due to the noob at the keyboard (me).\n\nrebase doesn't actually switch to another branch here, but it does\ndetach HEAD. To get back to a state you can work from, it's a simple\ncase of following the instructions rebase outputs:\n\n1) edit conflicted files to fix the conflicts.\n2) stage new versions of files (e.g. git add file.txt)\n3) git rebase --continue\n\nHere's what happens:\n\njast@perceptron 1% cat test.txt\n<<<<<<< HEAD:test.txt\ngit svn rebase blows up here\n=======\nhello from svn\nhello from git\n>>>>>>> add to txt file from git:test.txt\njast@perceptron % git branch\n* (no branch)\n  master\njast@perceptron % vim test.txt\n[...]\njast@perceptron % git add test.txt\njast@perceptron % git rebase --continue\nApplying: add to txt file from git\njast@perceptron % git branch\n* master\njast@perceptron %\n\nMake sense?\n-Jan\n"},{"id":"108173","messageId":"683a886f0903162134q2d8069ect1554e1b32ca6a3fb@mail.gmail.com","threadId":"18332","inReplyTo":"20090316233641.248f2e81@perceptron","subject":"Re: git-svn rebase can change branches during merge?","fromName":"Kevin Williams","fromEmail":"kevwil@gmail.com","sentAt":"2009-03-17T04:34:44Z","receivedAt":"2009-03-17T04:34:44Z","isPatch":false,"sender":{"key":"kevwil@gmail.com","avatar":"https://gravatar.com/avatar/a5087ab27d9fbcda120c6bdfa737a4b7c81172f98eb1c1774e9c96514f570fbd?d=mp&s=160"},"body":"On Mon, Mar 16, 2009 at 4:36 PM, Jan Krüger <jk@jk.gs> wrote:\n> Hi Kevin,\n>\n>> I've outlined steps where I can reproduce this bug here:\n>> http://gist.github.com/80058\n>>\n>> When using \"git svn rebase\" and there is a conflict between a local\n>> (git) change and an upstream (svn) change, the local git repository is\n>> left in a ghost-branch. It shouldn't change branches during a rebase,\n>> should it? I also seem to be unable to recover from the merge\n>> conflict, but that may be just due to the noob at the keyboard (me).\n>\n> rebase doesn't actually switch to another branch here, but it does\n> detach HEAD. To get back to a state you can work from, it's a simple\n> case of following the instructions rebase outputs:\n>\n> 1) edit conflicted files to fix the conflicts.\n> 2) stage new versions of files (e.g. git add file.txt)\n> 3) git rebase --continue\n>\n> Here's what happens:\n>\n> jast@perceptron 1% cat test.txt\n> <<<<<<< HEAD:test.txt\n> git svn rebase blows up here\n> =======\n> hello from svn\n> hello from git\n>>>>>>>> add to txt file from git:test.txt\n> jast@perceptron % git branch\n> * (no branch)\n>  master\n> jast@perceptron % vim test.txt\n> [...]\n> jast@perceptron % git add test.txt\n> jast@perceptron % git rebase --continue\n> Applying: add to txt file from git\n> jast@perceptron % git branch\n> * master\n> jast@perceptron %\n>\n> Make sense?\n> -Jan\n>\n\nI think so. Thanks for the detailed examples.\n\nI think sometimes I was committing after adding the fixed files, which\nwould seem to succeed but then the 'git rebase --continue' would blow\nup and I couldn't get back to master without 'git rebase --abort'.\n\nThanks again!\n\n\n-- \nCheers,\n\nKevin Williams\n"}]}