开发者

Cherry-picking changesets after bulk merge into main

Let's suppose that I have three branches:

Main
+--Dev
+--Release

And several changesets in Dev: changeset 1, 2 and 3 and all three changesets affect some File. At some point I merge them all into Main and get changeset 4, that includes changes from all three changesets.

What should I do if at this point I have to merge changeset 2 also into Release branch? If I try to merge from Main into Release I'll have to merge changeset 4 and then manually include only necessary edits made on File. But in this case after checkin, TFS will mark whole changeset 4 as merge开发者_Go百科d and will not offer it later for merge, despite the fact that changes from changeset 1 and 3 were not included.

I know I could have avoided this situation by merging each changeset from Dev into Main separately, but that's very tedious and doesn't seem like a right way.

I could also use baseless merge and go directly from Dev into Release, but that's something I consider to be an extreme measure.

Are there any other ways?


Sounds like you need feature branches. You could then just merge change set 2 into release. You can still do this after rebasing or cherry-picking change set 2 off of the common ancestor into a feature branch.

Git-tfs will help you do this.

Hope this helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜