Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Shortcut to do a diff on all modified files with latest version

Tags:

tfs

I'm looking for a way to kick off a diff on multiple files very easily.

I find it very tedious to have to:

  • Right click on every file
  • Click compare
  • Click with work space version.
  • Rinse and repeat for every file in my change set

Ideally, I'd like to be able to highlight all of the files in my change set, and perform one quick action that launched multiple windows of a diff tool, or launches them one after the other.

It's it's probably good to know that my question is very similar to this question but I'm looking for a way to do this in bulk.

like image 707
Adam Kalnas Avatar asked Dec 21 '11 18:12

Adam Kalnas


1 Answers

Use the Tf Command Line Utility. It comes with Visual Studio. You'll have a special command prompt with the tools loaded called "Visual Studio Command Prompt (2010)" in the Start Menu. You should cd to the root directory for the solution. This way you don't have to provide the commands with a servername, credentials, or workspace information. It will pick it up automatically.

I ran the difference command. Without any parameters, it automatically shows the diff for every pending change.

D:\my-project> tf diff

As you close the diff window, the next change will pop up.

like image 187
Anthony Mastrean Avatar answered Sep 30 '22 20:09

Anthony Mastrean