Merging TFS branches on different branches
I have the following structure in TFS:
- $Dev Branch 1 - $Integration Branch 2
I would like to merge the changes in Dev Branch 1 with Branch Branch Branch 2 so that developers can initiate a Hudson build of that Branch Branch.
I am using the Visual Studio 2008 command and when I try to use Dev Branch1 I can only see the base expand on the target branch.
Can anyone please advise how and is it possible to merge between Dev and Integration branches above.
source to share
There are several ways to do this, but nothing is great. For the first method, you will need to install the TFS 2010 power tools
Use a shelf kit. Start merging from dev to base, resolve any conflicts. Don't check the merge, revert the changes instead. Then from the command line use
tfpt unshelve "my shelve set" /migrate /source:$/teamProject/dev /target:$/teamProject/integration
. This will migrate the pending changes to the integration branch without having to make changes to the base branch.
Perform an unreasonable merge between developer and integration. You can do this using the command
tf merge $/teamProject/dev $/teamProject/integration /baseless /recursive
as soon as the rootless merge has established a branching relationship and you can continue the merge through the UI. Be careful, however, that an unreasonable merge will not be aware of any files or folders that have been renamed or moved, so you will need to make sure you check this for the account.
Personally, I would go for option 1 if it's one time. If this is something that you think you will need to do regularly, I would do an unreasonable merge where all three branches are in sync Ie right after you merged from dev to base and integration. This should minimize any unnecessary merge problems.
You can also take a look at your branching strategy so you don't have to do complex merges often. If you are using an integration branch, then it should have a direct link to any branches you need to integrate. Check out the ALM guide for branching .
source to share