I am trying to find the equivalent action of tf destroy
for a Git repository. That is to say, permanently delete the Git repository and recover the space in the database. Running TFS 2017 U3.
We have a number of Git repositories which where either added in error or are now obsolete and can be discarded. Merely "deleting" the repository does not appear to recover the space in the database. I am aware TFS cleanup runs on either a 5 or 7 day cycle to recover the space.
It appears TFS internally keeps track of the deleted repositories in a table - dbo.tbl_GitDeletedRepository, which also suggests they can be recovered (tho no option to do so).
Note: I am aware you cannot delete if only single repo is left.
In the alternative, is there a recommended approach to blow away the entire contents of the repository, compress the repository (gc
?), push that to TFS and thus recover the space in the database?