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