git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn rebase can change branches during merge?

From
Jan Krüger <jk@jk.gs>
Date
Mar 16, 2009, 22:36 UTC
Message-ID
<20090316233641.248f2e81@perceptron>
In-Reply-To
<683a886f0903161349k172679a6t24cc4e393aea8f2d@mail.gmail.com>
Hi Kevin,
Show 8 quoted lines
> I've outlined steps where I can reproduce this bug here:
> http://gist.github.com/80058
> 
> When using "git svn rebase" and there is a conflict between a local
> (git) change and an upstream (svn) change, the local git repository is
> left in a ghost-branch. It shouldn't change branches during a rebase,
> should it? I also seem to be unable to recover from the merge
> conflict, but that may be just due to the noob at the keyboard (me).

rebase doesn't actually switch to another branch here, but it does detach HEAD. To get back to a state you can work from, it's a simple case of following the instructions rebase outputs:

1) edit conflicted files to fix the conflicts.
2) stage new versions of files (e.g. git add file.txt)
3) git rebase --continue
Here's what happens:

jast@perceptron 1% cat test.txt <<<<<<< HEAD:test.txt git svn rebase blows up here ======= hello from svn hello from git

>>>>>>> add to txt file from git:test.txt
jast@perceptron % git branch
* (no branch)
  master
jast@perceptron % vim test.txt
[...]
jast@perceptron % git add test.txt
jast@perceptron % git rebase --continue
Applying: add to txt file from git
jast@perceptron % git branch
* master
jast@perceptron %

Make sense? -Jan

Previous: Kevin WilliamsNext: Kevin Williams
Message 2 of 3 in “git-svn rebase can change branches during merge?”
  1. Kevin WilliamsMar 16, 2009
  2. Jan KrügerMar 16, 2009
  3. Kevin WilliamsMar 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.