Status Command
Displays information about pending changes to files and folders in one or more workspaces. Or, when you use the /shelveset option, displays information about pending changes in a shelveset.
Requirements: See Team Foundation Server Permissions.
tf stat[us] itemspec [/collection:TeamProjectCollectionUrl]
[/login:username,[password]]
([/workspace:workspacename[;workspaceowner]]
| [/shelveset:shelvesetname[;shelvesetowner]])
[/format:(brief|detailed)] [/recursive][/user:(*|username)]
[/nodetect]
Parameters
Argument |
Description |
---|---|
/collection: TeamProjectCollectionUrl |
When you use the /workspace option, specifies the URL of the team project collection that contains the workspace that contains the pending changes. For example: http://myserver:8080/tfs/DefaultCollection. If not specified, by default the team project collection is presumed to be the one that contains the workspace that maps the current directory. Ignored if you do not use the /workspace option. Note See Remarks, below, for the limitations of this option. |
/format |
Specifies how much detail to display about each pending change:
|
itemspec |
Specifies the items for which you want pending change data. For syntax, see Team Foundation Version Control Command Reference. You can specify more than one itemspec argument. |
/login |
Specifies the user account to use to run the command. See Team Foundation Version Control Command Reference. |
/recursive |
Recursively retrieves data about pending changes to items in the specified directory and any subdirectories. |
/shelveset:shelvesetname[;shelvesetowner] |
Specifies the shelveset that contains the changes you want to list. This option cannot be combined with the /workspace option. |
/user |
Lists all pending changes made by the specified user. An asterisk (*) symbol includes data about changes from all users. The default is the current user. Note See Remarks, below, for the limitations of this option. |
/workspaceworkspacename[;workspaceowner] |
Specifies the name of the workspace that contains the pending changes. If not specified, the workspace is the one that maps the current directory. You can specify workspaceowner to get data about pending changes in a workspace that belongs to a specific user. If not specified, the workspace is presumed to be the current user, or if specified, the /login:username. This option cannot be combined with the /shelveset option. Note See Remarks, below, for the limitations of this option. |
Remarks
You can use the Status command to view pending changes in the current workspace (for example, the workspace that maps the current directory in the command prompt window) regardless of whether it is a local workspace or a server workspace. You can also use this command to view pending changes in a remote server workspace (for example, changes made by another user on another dev machine) by using the /collection, /user, and /workspace options. However, you cannot view pending changes in a remote local workspace.
Also see: Decide Between Using a Local or a Server Workspace.
Examples
In all the following examples, assume that $/SiteApp/Main/ is mapped to c:\code\SiteApp\Main\ in the workspace.
List all changes in the current workspace
c:\code\SiteApp\Main\SolutionA\>tf stat
Lists all pending changes in the workspace.
List all changes in a folder
c:\code\SiteApp\Main>tf stat SolutionA\*
Lists all pending changes to all items in the SolutionA folder.
List all changes in a folder and its subfolders
c:\code\SiteApp\Main>tf stat SolutionA\* /recursive
Lists pending changes to all items in the SolutionA folder, including those in its subfolders).
Work in Visual Studio
- Develop Code and Manage Pending Changes Use Visual Studio to view and manage pending changes.
Tips
Most changes you make to files under version control are queued as pending changes in your workspace. See Develop Code and Manage Pending Changes and Manage Your Workspaces.
You can use the Difference Command to get details about edit changes (changes to the content) in a file.
If you need to set aside changes (and perhaps also want to clean your workspace for another task), use the Shelve Command. For more information about shelvesets, see Suspend Your Work and Manage Your Shelvesets.
When you are ready to check in changes to the server, use the Checkin Command.