TFVC Command Line to Get Latest

July 15, 2020    TFVC Productivity Azure DevOps

TFVC Command Line to Get Latest

I was getting tired of right clicking in Visual Studio Source Control Explorer before merging (see I like Git over TFVC and Trunk Based Development to know that I don’t think TFVC and branching is optimal), so I found that you can use the VS developer prompt, go to where you have your code (your TFVC mapped workspace) and type in

`tf get $/MyProject/Dev/Source /recursive`. 

I created a bat file for each branch for less key strokes. Something like this

  REM bash to update TFVC to latest, Dev, Main, RC
  tf get $/MyProject/Dev/Source /recursive
  tf get $/MyProject/Main/Source /recursive
  tf get $/MyProject/RC/Source /recursive

There isn’t a lot of output, but it spits out “Replacing XController.cs”.

I haven’t ran into a merge conflict yet, but I imagine they will show up in VS (the same as if you clicked the buttons).

It’s definitely not as fast as git pull, but I’ll take this over finding, right click, click waiting for the server :-).

References



comments powered by Disqus

Please consider using Brave and adding me to your payment ledger. Then you won't have to see ads!

Support me and download Brave!

Use Brave