Always Check-Out the Latest Version of Code from TFS
» 15 May 2011 |
|
Labels:
- All Tech Articles -,
TFS,
Tips 'N' Tricks
|
When working with large teams, when multiple team members are working on the same project/module or the same piece of code, it is very essential that there is a strong version control system in place. And when it comes to Microsoft Platform, Visual Studio 2010 Team Foundation Server (TFS) is one of the most efficient version control tools available in the market.
When multiple developers are working on the same set of files, it is important that all the dependencies are taken care properly and before making any changes on the server, it is essential that we get a latest version of code from TFS to our local workspace, Check-Out the code and post that we can make changes and Check-In the code.
Often, when we perform a Check-Out operation in TFS, the workspace version of the code gets checked out, which sometimes may not be same as the server version due to various reasons like some other team member might have modified the file on the server, the developer himself might have modified the file in local (workspace version) without Checking-Out the latest version of file from server etc. As a result of this, when we simply perform a Check-Out operation without getting the latest version of code then we may end up losing the changes made by someone else on the server.
To avoid this, we can follow the below mentioned simple steps which will ensure that even if we just perform a simple Check-Out operation, TFS will get the latest version of code to our local workspace and then does a Check-Out which is effectively checking out the server version of code.
- Open Visual Studio 2010
- Connect to Team Project on Team Foundation Server
- Go to Tools -> Options...
- Go to Source Control in the left navigation pane and expand it
- From the expanded menu, select Visual Studio Team Foundation Server
- Now check the checkbox "Get latest version of item on check out" as shown below
Now, even if you forget to get latest before doing a Check-Out, Visual Studio/TFS will automatically ensure that a latest version of code is downloaded to your workspace and then a Check-Out is performed.
This makes our life a lot more simpler !!!
Until next time, happy learning :)
Note: This demonstration is based on Visual Studio 2010 Team Foundation Server (TFS)
|
|||||
|
|||||
|
|||||




0 comments:
Post a Comment