Git in TFS - removing branches after merging

We recently switched to Git, hosted in TFS 2013.

Several branches were created, merged, and then deleted using Visual Studio.

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

I expect this to become a huge mess if it is not cleaned regularly.

  • Should we even clear this?
  • How to remove branches from this list?
+7
git branch tfs visual-studio vsts
source share
1 answer

From Visual Studio, you have two options:

  • Unpublish
  • Delete

enter image description here

enter image description here

See: MSDN .

Unpublishing will remove the Branch tag on the remote server (VSO / TFS), which will hide the branch from web access.

Delete will delete the branch from the local TFS repository. It will remain on the remote server (VSO / TFS Server), but you will no longer have Visual Studio available in the branches window. You can return it by creating a local branch that re-tracks the remote branch:

enter image description here

So, for your purpose, you are looking for the "Unpublish" function. This will not delete any history in the branch.

+9
source share

All Articles