What is the equivalent in TFVC of git cherry-pick

时光怂恿深爱的人放手 提交于 2019-12-10 13:55:56

问题


I'm sorry for my question but I'm TFS noob user, what is the equivalent in TFVC (Team Foundation Version Control) of git cherry-pick?


回答1:


First, create a patch for the changeset that you want to cherry-pick:

tf diff /version:C1234 /format:unified > cherry.patch

(Note: be careful about redirecting to a file from PowerShell. It wants to write UTF-16 files which many programs have a hard time coping with.)

Then apply the patch using patch:

patch -p0 < cherry.patch



回答2:


There is one solution that has worked for me.

In TFVC, when you do a merge between 2 branches, there is a radio button where you can select to merge the whole branch or just a particular set of Changesets.

Follow the changeset option.




回答3:


There isn't, really. TFVC and Git are fundamentally different source control paradigms, and you shouldn't try to use them in the same fashion.

In TFVC, cherry picking is considered a bad practice, as are baseless merges (TFVC has hierarchical branches -- a baseless merge is merging between two branches that don't have a parent/child relationship). A merge should typically consist of all of the changes made to the branch, sequentially, up until a given point in time. Although you can merge individual changesets and skip changes you don't want to include, you can't merge multiple non-sequential changesets in one operation.



来源:https://stackoverflow.com/questions/39636925/what-is-the-equivalent-in-tfvc-of-git-cherry-pick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!