git: correct way to merge/rebase with respect to svn dcommit

Posted by Albert on Stack Overflow See other posts from Stack Overflow or by Albert
Published on 2010-06-08T12:45:14Z Indexed on 2010/06/08 14:52 UTC
Read the original article Hit count: 285

Filed under:
|
|
|
|

I have the following situation (mostly because I didn't really thought it through in the beginning -- or more exactly, I thought it shouldn't be a problem the way I did this but now I am stumbled):

... --- A --- B1 --- ... --- Bn

... --- git-svn

Whereby A and git-svn are at the same state (exactly the same files and file content) but they don't have any common point in history.

And I want:

... --- git-svn --- B1 --- ... --- Bn

Or at least, when I do the svn dcommit, I want exactly to get the commits B1 to Bn and nothing else.

I am not exactly sure how dcommit works. So if I would get something like this:

... ------------ A --- B1 --- ... --- Bn
                  \                    \
... --- git-svn -- A' ----------------- B'

would the dcommit behave in the way I want? Because if so, that would be easy to get (merging A into git-svn does work just fine because they are content-wise the same).

Or should I do some sort of rebase? But I don't want to rebase A on git-svn, just B1 to Bn.

© Stack Overflow or respective owner

Related posts about git

Related posts about merge