TFS: reattach solution to TFS, and compare folder to source control

No comments
I recently was in a situation where I had to add and change files in a solution that was originally in TFS,
but where TFS was unavailable because of migration to new hardware.

So I removed source control bindings and programmed away.

Now the server was up again, and I wanted to add my changes back to TFS.

I opened the solution in VS 2010, right-clicked it in Solution explorer and selected Add to source-control.
That gave me a warning and asked me to use the command Change source control, as it found this solution already in TFS (the "old" version).
So I went to File - source control - Change source control, and there I could bind my solution back to TFS by selecting the projects and clicking Bind.

But this only gets my already known solution files bound to TFS.
All new files added in the meantime is not detected.
All modified files are not marked as checked out.

So I could of course try to remember what files I changed, added etc., or even get the latest version from TFS into another folder, and then do a compare from there.

But as it turns out, TFS has this capability built right in to Visual Studio, if you only know where to look.
Open up Soure Control Explorer  (View - Other Windows - Source Control Explorer)
Find your solution in the tree and select it. Then click this button:


The next window will give you alternatives regarding what changes you want to find, defaults are fine with me:

Select ok, and voila!

You now get a window showing you all the files that are different, new etc, and the options to do something about it.

Great stuff, and easier than I had imagined when I started looking for it.

regards
Henri


No comments :

Post a Comment