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.

If I modify file names or delete files on the disk, does version control get<br />

out of sync?<br />

Yes. If you accidentally delete files or folders, the TFS server still thinks you have the<br />

latest versions on your local machine. This means that the get latest version command<br />

will not add the deleted files back onto your disk. In this case, use the force get command<br />

to restore the files or folders.<br />

If you need to rename files or delete files or folders, do so by using Source Explorer so<br />

that the server stays synchronized <strong>with</strong> your local changes.<br />

How does automatic conflict resolution work?<br />

A conflict can occur as a result of a pending change, merge, or get operation. When you<br />

opt to resolve the conflict, you can choose to have <strong>Visual</strong> <strong>Studio</strong> resolve the conflict<br />

automatically. Automatic conflict resolution only works on non-binary files that have no<br />

overlapping changes (for example, changes applied to the same line of code). In this case,<br />

changes for both file versions are merged into a new file version.<br />

If automatic conflict resolution does not work, you can choose to only accept changes<br />

from one of the files, or you can perform a manual merge by using the graphical compare<br />

and differencing tools provided by VSTS.<br />

Additional Resources<br />

• For more information about resolving conflicts, see “How to: Resolve Conflicts” at<br />

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

How do I resolve conflicts manually?<br />

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

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

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

changes, or resolve the conflict in the merge tool.<br />

You might need to resolve conflicts when merging changes between branches, getting<br />

files into your workspace, or checking in new versions of files. There are three conflict<br />

types:<br />

• Version – The file has evolved along divergent paths. This could be the result of a<br />

file edit, rename, delete, or undelete.<br />

• File name collision – Two or more items are trying to occupy the same path.<br />

• Local overwrite – Only occurs during a get operation, if you are trying to overwrite a<br />

local, editable file.<br />

Most conflicts can be resolved automatically; version conflicts are the only conflict type<br />

that might result in a manual merge operation. Manual merge is most common in the<br />

following scenarios:<br />

• A file has been edited in both branches, <strong>with</strong> changes to the same lines of code.

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

Saved successfully!

Ooh no, something went wrong!