Changeset Command

Displays information about and lets you change the attributes; such as comments and check-in notes that are associated with a changeset.

tf changeset [/comment:comment|@commentfile] [/server:servername] 
[/notes:(“NoteFieldName”=”NoteFieldValue”|@notefile)] [/noprompt] 
[changesetnumber | /latest]


Argument Description


Provides a comment about the check-in.


Specifies a path of a file on disk that contains the comment used for the check-in.


The user-provided value for the /server option. Example: teamfoundation2.


Sets the value of the check-in note field. You can provide multiple, semicolon-separated "field=value" expressions.


Provides the path of a file on disk that contains check-in note field names and values in the format of "field=value" with one per line.


Identifies the changeset to be reviewed or modified. Cannot be used with /latest.

Option Description


Replaces the changeset comment that was created during the check-in process, with a new comment.


Identifies the Team Foundation Server. This option is required if the command is invoked from a directory that is not mapped to a workspace.


Provides one or more check-in notes to associate with the changeset.


Specifies the most recent changeset. Cannot be used with changesetnumber.


Suppresses any prompts for input from you.


A changeset is a set of file and folder revisions that were committed to the Team Foundation source control server as part of the same check-in event. For more information, see Working with Source Control Changesets.

You can use the changeset command to view the attributes of a changeset and modify its mutable properties. You can use the History command to determine which changeset you want to obtain information about. For more information, see History Command.

For links to other Team Foundation commands that provide additional information about the items in your Team Foundation source control server and all the workspaces that map to it, see Informational Commands.


The following example Displays detailed information about changeset 8675309 in an editable format in the Changeset dialog box and replaces the existing comment with "This is a new comment."

c:\projects>tf changeset /comment:"This is a new comment." 8675309

The following example provides two check-in notes to associate with the changeset.

c:\projects>tf changeset /notes:reviewer=Jo; Security = checked 8675309

The following example provides two check-in notes that include spaces in the values and names to associate with the changeset.

c:\projects>tf changeset /notes:"Code Reviewer"="John Smith";"Security Reviewer"="Chen Yang" 8675309

The following example associates the check-in notes included in the file notes.txt with the changeset 8675309.

c:\projects>tf changeset /notes:@notes.txt 8675309

Where the notes.txt can be in following format:


field2=value that

spans multiple


field3 = value3;

The following example replaces the existing comment for changeset 8675309 and displays non-editable information about the changeset in the Command Prompt window. The example does not start the Changeset dialog box.

c:\projects>tf changeset /comment:”This is an automatically generated comment.” /noprompt 8675309

The following example displays non-editable information about changeset 8675309 in the Command Prompt window.

c:\projects>tf changeset 8675309 /noprompt

Sample output:

Changeset: 8675309
User: DOMAIN\JohnG
Date/time: 01/21/2004 21:03:45
Comment:  This check-in fixes issues in several features.  I also refactored some items in buf.c into a new file named bif.c because buf.c was too hard to parse.
   $/baz/proj/bif.c           Added
   $/baz/proj/buf.c          Modified, Renamed
Work Items:
   34527     The "Access Denied" message is not descriptive enough.
   35628     The UI flickers when I press the '8', 'y', 'Ctrl', and 'End' buttons at the same time.
Check-in Notes:
   Code Reviewer:  ShellM
   Localization Impact (yes or no): no
   UI/UE Change (yes or no): no


To use the changeset command you must have the Read permission set to Allow for any files or folders in the changeset for which you wish to display full information. The only users who can modify the notes and comments that are associated with a changeset are the users who created the changeset or a user who has the Revise other user's changes global permission. For more information, see Team Foundation Server Permissions.

See Also


Checkin Command
Checkout and Edit Commands
Shelve Command
History Command
Configure Command


Working with Source Control Changesets

Other Resources

Tf Command-Line Utility Commands