简体   繁体   中英

How to merge the changes of a Work Item to branches other than the source branch?

My question is similar to this older question To merge from the current branch into the other branch , except that I would like to know whether this can be done directly with TFS 2017 / 2019.

Assume we have a master branch that contains all the features of our software. For each one of our few clients, we have a separate client branch that contains only the features that the client wants. When we work on a new feature, we create a Work Item along with a feature branch from the master branch. When feature is completed, we would like to merge (via pull request) the feature branch to the master, and every client branch where this feature is to be deployed. Ideally, the pull request on all branches should fail, if the build on any branch fails. Also, if later on, another client that does not have that feature wants it, we would like to merge it into their client branch.

Can this be done with TFS 2017 (or TFS 2019)?

Thanks.

we would like to merge (via pull request) the feature branch to the master, and every client branch where this feature is to be deployed.

Merge the feature branch to the master should be simple, you can just merge it via pull request.

To deploy this feature to every client branch may be cumbersome, since client branch that contains only the features that the client wants not all features on master.

You can try to use cherry-pick in Visual Studio or git command line to copy the changes to the client branch.

If your client branch have branch policies, you could create a new branch based on the client branch without branch policies, then merge the feature to the new branch, finally, to create a pull request to merge the new create branch to the client branch.

If I don't understand your question correctly, please update your question with more info. The title of your question makes me a bit confused.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM