TF.exe or maybe the most useful tool for TFS
When you’ve to use TFS, then there are moments when you’re missing some features in the UI tools in Visual Studio. In those situations the console tool tf.exe is very useful. In this short blog post I summarized the commands I used the most.
Update an old version of a branch
It could happen, that the production branch or an older feature branch isn’t up-to-date, because somebody forgot one or several merges from the main branch. To fix that, there could be used the following statement:
tf.exe merge /recursive /force /version:T $/Project/Main/Source $/Project/Production/Source
Delete a branch permanently
After a while the number of merged feature branches increase. Normally, you would delete the merged feature branches, so they aren’t any longer visible in Visual Studio. But in my case, I display also the deleted items and this means, that I see all the deleted feature branches. To remove the old merged feature branches, there could be used the following statement:
tf.exe destroy $/Project/Development/FeatureX
2 thoughts on “TF.exe or maybe the most useful tool for TFS”
If you delete a branch do you still have the complete history of all commits (like git) or are they lost (like svn)?
@Urs Enzler
Hi Urs
I never tried this, but the documentation says, that you can choose if you want to keep the history or not. The flag is “/keephistory”.