26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How to Perform a Baseless Merge<br />

To perform a baseless merge, you use the tf merge /baseless command from the <strong>Visual</strong><br />

<strong>Studio</strong> 2005 Command Prompt.<br />

For example, the following command line will perform a baseless merge from the source<br />

branch to the target branch. The /recursive switch is used to perform a recursive merge<br />

of all the files and folders <strong>with</strong>in the specified branch path:<br />

Example<br />

tf merge /baseless /recursive<br />

tf merge /baseless c:\data\proj1 c:\data proj2 /recursive<br />

The process of merging items that are not directly branched from each other is known as<br />

a baseless merge. For example, you might want to merge a change between two release<br />

branches that are siblings of each other <strong>with</strong>out merging up to the parent branch. Baseless<br />

merging only works from the command line; you cannot perform a baseless merge from<br />

<strong>Visual</strong> <strong>Studio</strong>.<br />

When you perform a baseless merge, TFS does not have any information about the<br />

relationship between the files in the branches. For instance, a file rename will be viewed<br />

as a deleted file and a new file in the branch. For this reason you will have to perform<br />

more manual conflict resolution than you would when performing a normal merge.<br />

However, you only have to perform this conflict resolution one time. After you have<br />

performed the baseless merge, TFS records history and establishes a relationship between<br />

the folders/files.<br />

Baseless merges can only be created from the command line. Even after the first baseless<br />

merge, when a relationship has been created between the branches, future merges still<br />

need to be created from the command line.<br />

Additional Resources<br />

• For an explanation of merge command syntax, see “Merge Command” at<br />

http://msdn2.microsoft.com/en-us/library/bd6dxhfy(VS.80).aspx<br />

• For more information about merging, see “Understanding Merging” at<br />

http://msdn2.microsoft.com/en-us/library/ms181427(VS.80).aspx<br />

• For a walkthrough describing how to perform a merge, see “How to: Merge Files and<br />

Folders” at http://msdn2.microsoft.com/en-us/library/ms181428(VS.80).aspx<br />

How to Resolve Merge Conflicts<br />

To resolve merge conflicts, you use the <strong>Visual</strong> <strong>Studio</strong> merge tool. If a conflict is detected<br />

during a merge, you can resolve conflicts either automatically or manually. If you choose<br />

to resolve the conflict manually, you can keep the source changes, keep the target<br />

changes, or resolve the conflict in the merge tool.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!