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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

change or the destination change, integrate both changes, or manually modify the final<br />

version by typing directly into the file.<br />

After resolving every conflict in the file, save the final version as a pending change to be<br />

checked into the target branch.<br />

Be careful when merging because it is easy to make mistakes that might result in build<br />

instability. After you have finished merging, compile the resulting source and run unit<br />

tests to test for major breaks.<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 to Avoid Conflicts<br />

To help avoid conflicts:<br />

• Ensure effective team communication. When you work on a source file, let other<br />

team members know that you are working on the file and which aspects you will be<br />

updating. Although automatic conflict resolution can resolve many conflicts, you<br />

should avoid situations where two or more developers are working on the same<br />

functional areas in the same source file where there is a strong likelihood of you both<br />

making changes to the same lines of code. Conflicts on the same lines of code require<br />

manual conflict resolution, which complicates the merge operation.<br />

• Determine who else has a file checked out. Before updating a file, check to see if<br />

another team member has already checked out the file. If so, ask your colleague what<br />

he or she is working on and then decide if you can wait until they complete their<br />

changes or if it is safe to continue to work in parallel on the same file because you are<br />

working on separate functionality in separate source code regions <strong>with</strong>in the file.<br />

To view pending changes<br />

1. In Source Control Explorer, right-click the solution, project, folder, or file for<br />

which you want to see pending changes.<br />

2. Select View Pending Changes.<br />

This method shows you all of the pending changes <strong>with</strong>in the scope you have selected.<br />

You can also use the command-line checkout tool as follows to learn about pending<br />

changes:<br />

tf status /format:detailed /user:*<br />

This command displays detailed status information about any pending changes made by<br />

all users. In the resulting list, you can see who has which files checked out, along <strong>with</strong><br />

pending changes. To view the pending changes for a specific file, specify the filename as<br />

the first argument to tf.exe.

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

Saved successfully!

Ooh no, something went wrong!