Welcome to MSDN Blogs Sign in | Join | Help

some sample command-line usages of tf.exe

A customer had asked about how to do some specific operations with the command-line.  Our own DougN responded, and I wanted to include his examples here for others.

Baseless merging from one branch to another:

tf merge /recursive /baseless $/TeamProject/SourceBranch $/TeamProject/TargetBranch

 

Generate a list of labels that start with the text “Release”:

tf labels Release*

 

Generate a list of labels that start with the text “Release” and what files are in those labels:

tf labels /format:detailed Release*

 

Show the branch ancestry of a folder called $/TeamProject/Branch

tf branches $/TeamProject/Branch

 

Show a list of changesets that need to be merged between two branches

tf merge /candidate /recursive $/TeamProject/SourceBranch $/TeamProject/TargetBranch

 

Show a list of changesets that have already been merged between two branches

tf merges /recursive $/TeamProject/SourceBranch $/TeamProject/TargetBranch

 

Show a list of files that would be effected in a given merge operation

tf merge /preview /recursive $/TeamProject/SourceBranch $/TeamProject/TargetBranch

 

Show a list of changesets and included files that have been checked in since changeset 5000 under $/TeamProject:

tf history /format:detailed /recursive /version:5000~T $/TeamProject

 

Published Friday, April 07, 2006 5:56 PM by jmanning

Comments

# VSTS Links - 04/11/2006

Tuesday, April 11, 2006 9:49 AM by Team System News
Buck Hodges blogs about TFS Alerts: From address and filtering.

Charles Sterling talks about upgrading...

# TFS Top Tip #4: The Command Line Client is your friend.

Monday, June 26, 2006 5:15 AM by Martin Woodward
If you are going to be doing more than the basic check-in / check-out options then it pays to get to know the command line client – tf.  The command line client is actually the most flexible and powerful client...
Anonymous comments are disabled
 
Page view tracker