Merge two identical git-svn branch HEADs without losing link with git-svn remote branch?
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
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)
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.
精彩评论