6 tf - Team Foundation Client
11 'tf' [/server:<server name or ip address>] [/login:<login credentials>]
12 <command> [<command arguments>]
17 'tf' is a source control client for Microsoft Team Foundation Server.
21 */login*:username[,password]::
22 Provide authentication credentials. If you don't specify a
23 password you will be prompted for one. If you have
24 gnome-keyring support enabled, TF will store the login
25 credentials on your default keyring if configured to do so
26 (see "Credentials.Save" configuration option below).
28 */server*:<server name or ip address>::
29 Specify the Team Foundation Server. If you are within a mapped
30 working folder, you don't need to specify the /server option,
31 as this information is stored in the VersionControl.config
37 Pend an add on a file or files to the repository. To commit, you
38 must issue a checkin command.
40 *changeset <changeset id>*::
41 Show changeset details: committer, date, comment, and files changed.
42 The changeset id is just an integer - no "C" prefix is required as in
43 the diff command below.
45 *checkin [ <filenames or path> /recursive ]*::
46 Checkin pending changes in workspace. With no arguments, this command
47 will checkin all files in your workspace, not just all files underneath
48 your current working directory.
50 *checkout <filenames>*::
51 Checkout a file for editing. Command alias: edit.
53 *configure [ <key> | <key> <value> ]*::
54 With no arguments, displays current configuration. With 1 argument,
55 deletes the configuration setting <key>. With 2 arguments,
56 sets the value of <key> to <value>. See Configuration section below
57 for more details on valid settings.
59 *delete <filenames> [ /recursive ]*::
60 Pend a delete against a file or files from the repository. To commit, you
61 must issue a checkin command.
63 *diff <filename or path or changeset id> [ /old ]*::
64 Show pending changes as a diff. With /old, shows changes from current
65 workspace to latest on the server as a diff. With a changeset id, like
66 C12278, the command will show you a diff of the files changed in that
70 List files in specified server path. A way to explore the folders on the server
71 without setting up a workspace and downloading the files.
74 Update local repository with latest versions from the server.
75 Think "cvs/svn update". Note: Files are initially set to read-only, until
76 checked out with the *checkout* command.
78 *history <filename | path > [ /format:detailed /recursive ]*::
79 Display changelog history for specified file. If you are looking for a
80 git-log/svn log type function use this and add /recursive.
82 *labels [ <labelname> /owner:<ownername> /format:detailed ]*::
83 Displays labels or tags. Can optionally filter by <labelname> and <ownername>.
85 *ls-files <path> [ /deleted | /modified | /old | /unknown ]*::
86 Shows known, deleted, modified, old, or unknown files under the given path.
87 With no options, ls-files shows known files. /old option by default shows
88 only files in your workspace which are out of date, not new files on the
89 server you've not yet fetched. To show those files as well, use "/old /all".
90 This behavior may change in future releases, based on user feedback.
93 Finds all writable files and marks them as pending changes on the server.
94 It also finds all unknown files and marks them as pending adds, missing
95 files are marked as pending deletes. A great command to use if you apply
96 a patch to a tfs-managed tree and want to pend the changes to the server
100 Show server permissions on a file. Command alias: permission.
102 *properties <filenames> [ /recursive ]*::
103 Show detailed properties for each filename including server locks, encoding,
104 last modified date, changeset id, and whether the file has a newer version
107 *rename <oldname> <newname>*::
108 Rename a file or files in the repository.
110 *status [<filenames> /recursive ]*::
111 Show status of all pending changes in local workspace. Optional paths/filenames
112 may be added to narrow the resulting output.
115 Delete all files not under version control. Use /preview to see what
118 *undo* <filenames> [ /recursive ]::
119 Undo pending changes.
121 *workspace* [ /new | /delete ]::
124 *workspaces [ /format:detailed ]*::
125 List workspaces in server repository. Use /format:detailed for additional
128 *workfold [ <server path> <local path> | /unmap <local path> ]*::
129 Manage working folders. With no arguments, print current working folder
130 mappings. With a server path and local path, creates a new working folder
133 *view <filenames | server paths>*::
134 Displays the latest version of the specified file or files.
139 * List all workspaces on the server 10.2.10.2, using a username of
140 "domain\\username" and a password of "password".
143 $ tf workspaces /server:10.2.10.2 /login:domain\\username,password \
144 /owner:"*" /computer:"*"
147 * Create a workspace with the name "workspaceName" with an owner name of ownerName
150 $ tf workspace /new "workspaceName;ownerName"
153 * Setup a working folder for the project "ProjectName" in directory ~/src/project
156 $ tf workfold "$/ProjectName" /home/username/src/project
159 * Fetch/Get all files in folder in project "ProjectName" to local machine.
162 $ tf get /recursive /home/username/src/project
165 * Delete the workspace "workspaceName" created above.
168 $ tf workspace /delete workspaceName
174 You can execute multiple commands in sequence in a single run of TF,
175 by separating the commands with '%'. Here's how you might checkin a
176 patch with a single run of TF:
179 $ patch -p1 < ~/new-feature.diff
180 $ tf online % checkin
186 The TF client stores configuration settings in ~/.tf/TfClient.config.
189 The TF client will display a summary of pending
190 changes and ask for confirmaton below committing changes to the server
191 when set to "true". The default is "false". It's non-trivial to rollback
192 a committed change, so this option is highly recommended.
195 The TF client will always checkout the latest version rather than
196 the workspace version if this setting is set to "true". Note: this option
197 only effects the checkout command, not the "online" command.
200 The TF client will store login credentials if this
201 setting is set to "true". The default is "false".
204 A comma separated list of files to ignore. Currently, only the "online"
205 command honors this setting. The wildcard characters * and ? are supported.
206 Example setting: "*.dll,*.pdb".
209 The TF client will automatically do recursive gets when set
210 to "true". IMHO, this is far more useful than the default behavior.
212 *History.DefaultToCwd*::
213 The TF client will default to the current working directory if not options
214 are given when running the subcommand "history". The default behavior of the
215 standard client is to require a path for all history queries. This option
216 provides an optional and more sensible default.
218 *History.Recursive*::
219 The TF client will automatically do recursive history queries when set
220 to "true". IMHO, this is far more useful than the default behavior.
225 The TF client keeps a cache of workspaces and folder mappings in
226 ~/.tf/Cache/VersionControl.config. Here's a sample file:
229 <VersionControlServer>
231 <ServerInfo uri="http://10.2.1.2:8080/">
232 <WorkspaceInfo name="neo" ownerName="DOMAIN\USER" computer="MYBOX" comment="" LastSavedCheckinTimeStamp="4/26/2007 11:55:50 PM">
234 <MappedPath path="/home/jreed/Source/xyz-project" />
235 <MappedPath path="/home/jreed/Source/abc-project" />
240 </VersionControlServer>
246 TFS doesn't have built in support for tracking file attributes, for
247 example, whether the file is executable or not. The TF client included
248 in this package makes use of libmagic to determine whether a file
249 should be marked executable or not.
254 http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx
255 http://msdn2.microsoft.com/en-us/teamsystem/default.aspx
256 http://msdn2.microsoft.com/en-us/cc31bk2e(VS.80).aspx
261 Written by Joel Reed <joelwreed@gmail.com>
266 Documentation by Joel Reed <joelwreed@gmail.com>