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

Re: Bug in git-svn: dcommit commits in the wrong branch after a rebase

From
Steven Grimm <koreth@midwinter.com>
Date
Aug 9, 2007, 15:46 UTC
Message-ID
<46BB36BB.4030708@midwinter.com>
In-Reply-To
<21FC6D7F-5459-406D-AA06-D16E525B3C17@lrde.epita.fr>
Benoit SIGOURE wrote:
Show 5 quoted lines
> git-svn fetch
> git-checkout -b myb b
> git-rebase master
> git-svn dcommit # sends the commit to SVN branch `a' instead of SVN 
> branch `b'!

That's exactly what I would expect to happen. The "git-rebase" is the key here; it is effectively telling git to switch back to your master branch. Try running "git log" before and after the rebase command and you should get a slightly better idea of what's happening. Rebase is kind of a tricky beast; a basic rule of thumb is that you should only use it to go forward in time on a single upstream branch, not to hop between upstream branches. Its behavior in non-forward-in-time cases is predictable once you know how it works, but not necessarily intuitive.

What are you expecting rebase to do here? We can probably suggest some other commands that will do what you're hoping to do. My hunch is that you're trying to use it to effectively do a merge of your "a" and "b" branches, but maybe I'm wrong about that.

-Steve
Previous: Benoit SIGOURE
Message 3 of 3 in “Bug in git-svn: dcommit commits in the wrong branch after a rebase”
  1. Benoit SIGOUREAug 8, 2007
  2. Benoit SIGOUREAug 9, 2007
  3. Steven GrimmAug 9, 2007

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.