What is the difference between "Compare with Workspace version" and "Compare with Latest version"?

I am using Visual Studio 2012 with TFS. Whenever I want to compare my checked out files, I have two options to choose from:

  1. Compare with workspace version
  2. Compare with latest version

screenshot

What is the difference ?


Solution 1:

Compare with Latest version seems clear. It compares files against the latest version in TFS. So you'll get all the differences between the very latest version checked into source control and whichever folder you're comparing against.

Compare with Workspace version might be confusing, but is actually pretty simple. TFS keeps track of the version of the file which you've retrieved into your workspace. This is usually the latest version, or pretty close to that, but that doesn't have to be the case.

When using the Get Specific Version option you can retrieve any version of a file to your local workspace. You can even retrieve files from different versions into your workspace. When you select this option, a comparison will be done against the version that is currently in your workspace.

Compare screen

Solution 2:

  • Comparing with workspace version actually compares the edited file with the version of file at the time you checked out (compares exclusively your changes).

  • Comparing with latest version compares the edited file with latest version of file present at your code repository i.e. it might include changes made by your colleagues.

http://codereferences.blogspot.ca/2012/03/tfs-compare-with-workspace-version.html