I'm currently reorganising our TFS source control for a very large set of solutions, and I've done this successfully so far.
I have a problem at the moment where I need to delete a legacy "Release Branch" TFS project that was branched for the old structure, and is no-longer required since I now host a release branch within the new structure.
This is an example of how the source control now looks after moving everything:
$/Source Project
/Trunk
/[Projects]
/Release
/[Projects]
$/Release Branch Project
/[Projects]
/[Other legacy stuff]
So far I've found information that says:
tf delete /lock:checkout /recursive TestMain
to delete a branch.TfsDeleteProject
to delete a project
tf delete
seems to be only relevant when I need to delete a branch that is within the same project as the trunk, and TfsDeleteProject
doesn't seem like it will delete the branch association from the source project (I hope I'm wrong, see below).
Can someone tell me if the above will work, and in what order I should perform them in, to successfully delete the TFS $/Release Branch Project
while also deleting the branch association (from right-click $/Source Project
-> Properties -> Branches)?
Select the branch folder you want to unbranch. then
File > Source Control > Branching and Merging > Convert to Folder
.In TFS you generally cannot permanently delete anything inside a team project (and
TfsDeleteProject
deletes a complete team project, but it is not clear if the source control content will actually be removed as a team project is just the top level of the source control tree).A delete of a file, or whole set of files is just another tracked change, go back into history and it can still be seen.
You could use permissions to make it inaccessible to all. Or rename under an "Obsolete" team project.
EDIT (I finally remembered where this command was):
There is another option, from the command line:
tf destroy
:I would expect this to remove the branch records to create the, now destroyed, files... but you might need to check.
Let me put the facts like this:
In
VS2013
I couldn't find it under @Radhika answerI did find it under
Team Explorer > Source Control Explorer >
right mouseon project > Branching and Merging > Convert to folder
Hope this saves you time.
Edit Copied from comment by @DdW: you need to do a
Get Latest Version
after converting, before the Delete option will be enabled