views:

82

answers:

1

I've got a pair of git-svn branches which have been manually kept in sync by applying patches and what-not; git-merge has not been used. The branches are now in sync, which is to say that git diff A B has no output at all.

[A] +----+--+--+--+--------+---+--------+-+---+->
     \  /  X  /  /   \ \  X   /        / / \ X
[B] --+-----+---------+-+--+----------------+-+->

How can I get git to consider the two branches as merged, such that a future git merge will use today's HEAD as the merge-base, without losing the git-svn association to SVN?

What I've tried

  1. git checkout A; git merge B

    This selects the SVN branch point as the merge-base, and then attempts to resolve years of duplicated cross-merging that was done manually.

(This list expected to grow)

A: 

I have no idea about the impact on SVN, but git checkout A; git merge --ours B will record a merge B -> A where no changes are done at all, --ours means that the merge result is identical to the first parent.

kaizer.se
That's exactly what I was looking for. `git svn dcommit` does a rebase under the hood which breaks the merge, but this lets me re-connect two commits. Thanks!
RobM