Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS out of sync between local and remote - how to "re-sync"?

Tags:

tfs

codeplex

I have a Project on CodePlex which is using TFS and I am using the TFS Plugin for Visual Studio. Now I have copied this project and worked on another PC without TFS and done some refactoring. Foolishly, I have then just used copy/paste and manual text editing to merge my changes, expecting that TFS just picks up the changes.

Apparantly, that is not the case. Here is a screenshot of my local directory: My Local TFS http://img259.imageshack.us/img259/2897/tfslocal.jpg

Notice how some files are missing the lock symbol - those are missing. If you look at the current TFS Tree on Codeplex, there are some files which do not exist locally anymore, i.e. WikiPlexExtensions.cs in the main folder.

Is there any way to easily tell TFS to compare my local to the remote repository and pick up the changes? I could re-add the local files using "Exclude from local project" and re-adding them, and I could create the "deleted" files as empty files just to delete them, but if I can avoid the manual messing around that would be good as well :)

like image 907
Michael Stum Avatar asked Aug 03 '09 19:08

Michael Stum


2 Answers

The easiest way is to exploit VS 2008's "online" feature. Basically you want to set your solution offline, then bring it online while connected to the proper Codeplex server. TFS should figure out the rest.

  • Feature overview: http://msdn.microsoft.com/en-us/teamsystem/bb898913.aspx
  • Tweaking the settings by hand: http://blogs.msdn.com/benryan/archive/2008/07/09/using-tfs-2008-power-tools-to-modify-server-s-offline-state.aspx
like image 109
Richard Berg Avatar answered Oct 13 '22 19:10

Richard Berg


To compare local and server folders, you can check out TFS Power Tool. After installing it, you can bring up the source control explorer, right click on the server folder and then select 'Compare'. Folder difference window will display the differences. You can also right click on the differences to see available commands such as 'Get Latest' to update your local folder for example. Check out Bryan Harry's blog post on the power tool

like image 36
Mehmet Aras Avatar answered Oct 13 '22 21:10

Mehmet Aras