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?
git cherry-pick is a powerful command that enables arbitrary Git commits to be picked by reference and appended to the current working HEAD. Cherry picking is the act of picking a commit from a branch and applying it to another. git cherry-pick can be useful for undoing changes.
As you can see, aborting a cherry-pick in Git is very easy. Just use the git cherry-pick command with the --abort option.
When you are performing a regular cherry-pick, you will get a new commit hash but the commit message will be the same. However, there is a way to append the origin of a cherry-pick to the commit message : by using the cherry-pick with the “-x” option.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With