Getting Latest Code from TFS - The Right Way!
» 17 Nov 2010 |
|
Labels:
- All Tech Articles -,
TFS
|
Sometimes when we try to get the latest code from TFS using Get Latest Version option, it does not get us the latest changes in various scenarios. Example: When some of the files are removed/missing from local folder (workspace) etc.
The issue can be reproduced using the following steps:
- Connect to your Team Project on Source Control/Team Foundation Server.
- Create a new workspace by mapping to appropriate folder on local file system.
- Download the latest code from TFS into local using Get Latest Version option.
- Now, go to file system (workspace) and delete few of the files which you just downloaded in previous step.
- Go back to TFS and try to get the latest version of the code using Get Latest Version option for the same folder/workspace for which you downloaded the latest code in previous steps. Now you will see the following dialog box which says all your local files are up to date.
Note that you deleted few files from your local folder but still Get Latest Version option says all the local files are up to date.
To address this issue and to get the latest code from TFS, here is the correct approach. Follow the below mentioned steps to get the Latest Code from TFS in the Right Way!
- Connect to your Team Project on Source Control/Team Foundation Server.
- Right click on the folder for which you want to download the latest server changes to local and select Get Specific Version… option from the context menu.
- Now a dialog box appears as shown below:
The above dialog box is self-explanatory with the items highlighted and the callouts.
The settings in the above dialog box will get the latest version of the code from TFS into your local environment (workspace) by overwriting any modified / unmodified files (locally in file system) and leaving any checked out files untouched/unmodified.
Note: This demonstration is based on Team Foundation Server 2010 (Visual Studio 2010 Ultimate).
|
|||||
|
|||||
|
|||||




0 comments:
Post a Comment