This project is read-only.

Plan to Avoid Conflicts

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

Plan to avoid having multiple developers working in the same region of the same source file at the same time. Do this to avoid conflicts that are potentially difficult to correctly resolve. While automatic conflict resolution can resolve many conflicts, you should avoid situations where two or more developers are working on the same method, or on the same lines of code. Conflicts on the same lines of code require manual conflict resolution, which complicates the merge operation. Effective team communication is the key.

Before starting work on a file, make sure that you have the latest version from source control and check to see if anyone else has the file checked out before you begin work. If a colleague has the file checked out, ask your colleague what he or she is working on and then decide if you can wait until they complete their changes or if it is safe to continue to work in parallel on the same file because you are working on separate functionality in separate source code regions within the file.

To check if someone else has a file checked out
  1. In the Team Explorer window in Visual Studio, double-click Source Control.
  2. Browse to the folder containing the file you want to check in the source control folder hierarchy.
Any pending changes are listed together with the username of the user who owns those changes.

To check which files people currently have pending changes for, run the following command from a Visual Studio 2005 command prompt window.

Tf status /format:detailed /user:*

When you do begin working on a source file that you know others will work on in parallel, let other team members know that you are working on the file and which aspects you will be updating.

Additional Resources

Last edited Jul 26, 2007 at 10:50 AM by prashantbansode, version 3


No comments yet.