Question

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)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top