Friday, September 14, 2018

Deleting a Branch/Folder in TFS

One thing that bugs me with TFS source control is having to have local copies of files and folders before you can perform actions on them. One great example where this is a big problem is when deleting a large folder or branch where you don’t already have the items locally.

There is however a trick that will avoid having to download the entire content (which can take ages), and that is to just sync the top level folder. This is achieved from the command line using the tf.exe command line without the recursive option.

  • Open a Visual Studio command prompt
  • type tf get {name of folder}

Returning to Visual Studio you should now be able to delete the folder and check in the change without having to pull down the entire tree content.

This can prove to be a massive time saver!