Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git in TFS - Remove branches after merging

We recently migrated to Git hosted in TFS 2013.

A few branches have been created, merged and then deleted using Visual Studio.

However, these branches are still visible in the TFS web interface when going to Code>Branches.

I expect this to become a huge mess if this will not be cleaned up regularly.

  1. Should we even want to clean this up?
  2. How do I remove branches from this list?
like image 435
SaphuA Avatar asked Mar 20 '15 08:03

SaphuA


1 Answers

From Visual Studio you have two options:

  1. Unpublish
  2. Delete

enter image description here

enter image description here

See: MSDN.

Unpublish will remove the Branch tag on the remote (VSO/TFS server) and that will hide the branch from the Web Access.

Delete will remove the branch from your local TFS repository. It will remain on the remote (VSO/TFS Server), but you will no longer have it available in your Visual Studio's Branches window. You can get it back by creating a local branch that tracks the remote branch anew:

enter image description here

So, for your purpose, you're looking for the "Unpublish" feature. This will not delete any of the history in the branch.

like image 135
jessehouwing Avatar answered Oct 13 '22 22:10

jessehouwing