Deleting branches don’t removes them from source control folder properties
Have you ever created a branch in the wrong directory and noticed it too late (after check-in)?
For example, you create a branch under “$/Project/Main/” instead of “$/Project/Dev/”. After you have realized your mistake, you go for a delete on the branch (checking in) and create a new one under “Dev”.
Now go to the branches tab on the source control folder properties and look what you’ve got:
![]()
Your deleted branch will appear in the tree without any information that it was deleted. It’s right that the branch wasn’t removed because TFS handles deletes only with a status change. But I don’t want to see the deleted files, right? Or at least they should be marked as deleted. Because I think this is really confusing, I posted a bug at connect:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=336734
How can I really remove the branch?
To really remove your branch, go for a destroy with the tf command line util.
To remove an item out off source control (not only mark as deleted), run the destroy command:
>tf destroy {BRANCHNAME}
Because you already have deleted the branch, the command will throw an exception that the branch wasn’t found. This is because deleted items will get renamed with a deletion-id suffix. To get the deletion-id, go and run the properties command:
>tf properties {BRANCH_NAME}
Now, after you have the deletion-id, go and run the destroy command again (don’t forget the x!):
>tf destroy {BRANCHNAME};x{DELETION-ID}
The properties window of your source control folder will show only the existing branches
.
No comments yet.