开发者

Merge two identical git-svn branch HEADs without losing link with git-svn remote branch?

开发者 https://www.devze.com 2022-12-19 09:26 出处:网络
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

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)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消