Tuesday, October 20, 2015

Make TFS to work more like Git!


By just one click you will be able to:
  1. Auto-detect changed files 
  2. Undo unchanged files
Note: Requires TFS Power Tools installed.

  • Add new command "Sync TFS pending changes" in Visual Studio -> Tools


    Title: S&ync TFS pending changes
    Command%windir%\System32\cmd.exe
    Arguments: /C "tfpt.exe online /diff & echo y | tfpt.exe uu /recursive /noget"
    Initial Directory: $(SolutionDir)

  • Put this new command to Visual Studio toolbar:


    - Right-click on a toolbar area then Customize... --> Toolbars - > New...
    - Give new toolbar name as "Sync TFS pending changes".
    - Go to the Commands tab, select the Toolbar = "Sync TFS pending changes".
    - Add Command --> Tools and select the appropriate External Command (#4 in my case).
      
  • PS. This command affects entire workspace including other TFS projects. To scope to working directory add some dots:

    /C "tfpt.exe online . /diff & echo y | tfpt.exe uu . /recursive /noget"

No comments:

Post a Comment