add Workfold.CreateLocal option to automatically create
[tfs.git] / docs / tf.txt
blob488ece004cb9b409b60a94da9e9967018e355bc2
1 tf(1)
2 =====
4 NAME
5 ----
6 tf - Team Foundation Client
9 SYNOPSIS
10 --------
11 'tf' [/server:<server name or ip address>] [/login:<login credentials>]
12                 <command> [<command arguments>]
14 DESCRIPTION
15 -----------
17 'tf' is a source control client for Microsoft Team Foundation Server.
19 OPTIONS
20 -------
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). The login username
27   can be a domain account, in which case use the syntax "domain\\username".
29 */server:<server name or ip address>*::
30         Specify the Team Foundation Server. If you are within a mapped
31   working folder, you don't need to specify the /server option,
32   as this information is stored in the VersionControl.config
33   cache file.
35 COMMANDS
36 --------
37 *add <filenames>*::
38         Pend an add on a file or files to the repository. To commit, you 
39   must issue a checkin command. 
41 *changeset <changeset id>*::
42         Show changeset details: committer, date, comment, and files changed.
43         The changeset id is just an integer - no "C" prefix is required as in 
44         the diff command below.
46 *checkin [ <filenames or path> /recursive /comment:<comment> ]*::
47         Checkin pending changes in workspace. With no arguments, this command
48   will checkin all files in your workspace, not just all files underneath
49   your current working directory. Due to a limitation in Mono.GetOptions,
50   the /comment parameter cannot include spaces. This will be fixed soon!
52 *checkout <filenames>*::
53   Checkout a file for editing. Command alias: edit.
55 *configure [ <key> | <key> <value> ]*::
56         With no arguments, displays current configuration. With 1 argument,
57         deletes the configuration setting <key>. With 2 arguments,
58         sets the value of <key> to <value>. See Configuration section below 
59   for more details on valid settings.
61 *delete <filenames> [ /recursive ]*::  
62         Pend a delete against a file or files from the repository. To commit, you 
63   must issue a checkin command.
65 *diff <filename or path or changeset id> [ /old | /modified ]*::
66   Show pending changes as a diff. With /old, shows changes from current 
67   workspace to latest on the server as a diff. With /modified, shows 
68         changes to writable workspace files as a diff - another way to preview
69         changes before using the *online* command. With a changeset id, like
70   C12278, the command will show you a diff of the files changed in that
71   changeset.
73 *dir <server path>*::
74   List files in specified server path. A way to explore the folders on the server
75   without setting up a workspace and downloading the files.
77 *explore*::
78   Graphically explore a TF repository. Changeset view, directory view, and file view
79   options. Control-C will copy currently selected path to the clipboard.
81 *get [ <path> ]*::
82   Update local repository copy with latest versions from the server. 
83         Think "cvs/svn update". Note: Files are initially set to read-only, until
84   checked out with the *checkout* command.
86 *help [ <cmd> | /list ]*::
87   Show builtin help. Optionally, specify a tf command for which to 
88   show detailed help. The /list option is primarily a helper for shell 
89   completion code.
91 *history <filename | path > [ /format:<format> /recursive /stopafter:X ]*::
92         Display changelog history for specified file. If you are looking for a
93         git-log/svn log type function use this and add /recursive. Use /stopafter
94   to limit the number of entries returned. Valid format specifiers include 
95         "brief" (the default), "detailed", and "byowner". The "detailed" format displays
96         all files changed in a changeset and the "byowner" format summarizes the history
97   by owner, showing how many changes each user committed.
99 *label <labelname> <itemspec> [ /recursive ]*::
100   Add a label or tag to an item.
102 *labels [ <labelname> /owner:<ownername> /path:<server path> /format:detailed ]*:: 
103         Displays labels or tags. Can optionally filter by <labelname>, <ownername>,
104   and <serverpath>.
106 *lock /lock:[None | Checkin | Checkout] <itemspec> [ /recursive ]*::
107         Locks a file in the repository. Use /lock:none to remove the lock.
109 *ls-files <path> [ /deleted | /modified | /old | /unknown ]*::
110         Shows known, deleted, modified, old, or unknown files under the given path.
111         With no options, ls-files shows known files. /old option by default shows
112   only files in your workspace which are out of date, not new files on the
113   server you've not yet fetched. To show those files as well, use "/old /all".
114   This behavior may change in future releases, based on user feedback.
116 *merges [<source>] <destination>*::
117         Lists merge points in the history of the destination item. The destination 
118         item can either be expressed as a server item or a local item.
120 *online <path> [ /added | /modified | /deleted | /preview ]*::
121   Finds all writable files and marks them as pending changes on the server.
122         It also finds all unknown files and marks them as pending adds, missing
123   files are marked as pending deletes. A great command to use if you apply
124         a patch to a clean tfs-managed tree and want to pend the changes to the 
125         server for checkin. The /added, /modified, /deleted flags can be used
126         to show just additions, just modifications, or just deletions respectively.
127         These flags may be combined. With no flags, all changes are shown.
129 *perm <filename>*::
130         Show server permissions on a file. Command alias: permission.
132 *properties <filenames> [ /recursive ]*::
133         Show detailed properties for each filename including server locks, encoding,
134   last modified date, changeset id, and whether the file has a newer version
135   on the server.
137 *rename <oldname> <newname>*::
138         Rename a file or files in the repository.
140 *rollback <changeset>*::
141         Undo a changeset. Retrieves previous versions of all files modified
142         in the selected changeset, then marks them as pending changes. NOTE: 
143         this command is only useful if no one else has changed the file since 
144         <changeset> was checked in. If a file has been modified by subsequent
145         checkins and you rollback, all subsequent modifications will be lost!
147 *shelve <name> [ <path> | /delete ]*::
148         Create or delete a shelveset. A shelveset is a way to store local changes
149   on the server without checking them in.
151 *shelvesets [ <name> | <name;owner> ] [ /owner:<owner> ]*::
152   Show shelvesets on the server. Use /owner:"*" and no name argument to view all 
153   shelvesets.
155 *show [ build | cache | ident | stats | tools ]*:: 
156         Show information about build configuration, cache settings, identity info,
157         usage statistics, or registered server tools.
159 *status [ <filenames> /recursive ]*::
160   Show status of all pending changes in local workspace. Optional paths/filenames
161         may be added to narrow the resulting output.
163 *treeclean*::
164   Delete all files not under version control. Use /preview to see what 
165         would be deleted.
167 *undo [ <filenames> /recursive ]*::
168   Undo pending changes. With no filenames, undoes all pending changes.
170 *unlabel <labelname> <itemspec>*::
171   Remove a label or tag from an item.
173 *workspace [ /new | /delete ]*::
174   Manage workspaces.
176 *workspaces [ /format:detailed <workspace-name> ]*::
177         List workspaces in server repository. Use /format:detailed for additional
178   information. Specify a workspace name to filter results.
180 *workfold [ <server path> <local path> | /unmap <local path> ]*::
181   Manage working folders. With no arguments, print current working folder 
182   mappings. With a server path and local path, creates a new working folder
183   mapping.
185 *version*::
186   Displays the version of the program.
188 *view <filenames | server paths>*::
189         Displays the latest version of the specified file or files.
191 EXAMPLES
192 --------
194 *List all workspaces on the server 10.2.10.2, using a username of "domain\\username" and a password of "password".*::
195   tf workspaces /server:10.2.10.2 /login:domain\\username,password /owner:"+++*+++" /computer:"+++*+++"
197 *Create a workspace with the name "workspaceName" with an owner name of ownerName.*::
198   tf workspace /new "workspaceName;ownerName"
200 *Setup a working folder for the project "ProjectName" in directory ~/src/project.*::
201   tf workfold "$/ProjectName" /home/username/src/project
203 *Fetch/Get all files in folder in project "ProjectName" to local machine.*::
204   tf get /recursive /home/username/src/project
206 *Delete the workspace "workspaceName" created above.*::
207  tf workspace /delete workspaceName
209 *Add all unknown files to the repository.*::
210  tf ls-files /others %% add
212 MULTIPLE COMMANDS
213 -----------------
214 You can execute multiple commands in sequence in a single run of TF, 
215 by separating the commands with '%'. Here's how you might checkin a 
216 patch with a single run of TF:
219 ------------
220 $  patch -p1 < ~/new-feature.diff
221 $  tf online % checkin
222 ------------
224 If you'd like to pipe the output from the ls-files or diff (brief
225 mode only) subcommands to the next subcommand in the chain use
226 '%%' instead. This can be particularly useful with ls-files.
228 CONFIGURATION
229 -------------
230 The TF client stores configuration settings in ~/.tf/TfClient.config.
232 *Checkin.Validate*::
233         The TF client will display a summary of pending
234   changes and ask for confirmaton below committing changes to the server
235   when set to "true". The default is "false". It's non-trivial to rollback
236   a committed change, so this option is highly recommended.
238 *Checkout.Latest*::
239   The TF client will always checkout the latest version rather than
240   the workspace version if this setting is set to "true". Note: this option
241         only effects the checkout command, not the "online" command.
243 *Credentials.Save*:: 
244         The TF client will store login credentials if this
245   setting is set to "true". The default is "false".
247 *File.Excludes*::
248         A comma separated list of files to ignore. Currently, only the "online"
249         command honors this setting. The wildcard characters * and ? are supported.
250         Example setting: "*.dll,*.pdb".
252 *File.ReadWrite*::
253   The TF client defaults to setting all non-checked out files to readonly. Set
254   this setting to "true" to make them read-write.
256 *Get.DefaultToCwd*::
257         The TF client will default to updating all registered working folders if no
258         folder arguments are given when running the subcommand "get". By enabling
259         this option, the TF client will instead look for updates starting with
260         the current working folder and subfolders (as needed). If you have lots of
261         registered working folders but only actively track a few of these folders,
262         the default behavior can become quite tedious.
264 *Get.ChangesetMtimes*::
265   The TF client does not default to preserving file modification times. By 
266         enabling this option, TF will set the modification time of any file 
267         subsequently fetched to the date of the last changeset in which the file 
268         was modified. Warning: this mode of operation can significantly slow down
269   "tf get".
271 *Get.Recursive*::
272         The TF client will automatically do recursive gets when set
273         to "true". IMHO, this is far more useful than the default       behavior.
275 *History.Detailed*::
276         The TF client defaults to brief output of history which does not include 
277         file level information. Set this setting to "true" to get file level history.
279 *History.DefaultToCwd*::
280         The TF client will default to the current working directory if not options
281         are given when running the subcommand "history". The default behavior of the
282         standard client is to require a path for all history queries. This option
283   provides an optional and more sensible default.
285 *History.Recursive*::
286         The TF client will automatically do recursive history queries when set
287         to "true". IMHO, this is far more useful than the default       behavior.
289 *History.StopAfter*::
290   The TF client defaults to showing the last 255 checkins in history output.
291   Set this option to an integer to change the default.
293 *Merges.Recursive*::
294         The TF client will automatically do recursive merge queries when set
295         to "true". IMHO, this is far more useful than the default       behavior.
297 *Online.Recursive*::
298         The TF client will automatically do a recursive online command when set
299         to "true". IMHO, this is far more useful than the default       behavior for
300         clean trees. Not as helpful for trees littered with build output files.
302 *Server.Default*::
303   If the TF client cannot determine the server to connect to, first from 
304         the "/server:" option, and second the workspace cache, then it will
305   use the Server.Default setting if non-null.
307 *Workfold.CreateLocal*::
308         When you map a local directory to a server path, the TF client does not
309         automatically create the local directory. Enable this option to do so.
311 *Workspace.Default*::
312   If the TF client cannot determine the active workspace, first from 
313         the "/workspace:" option, and second the workspace cache, then it will
314   use the Workspace.Default setting if non-null.
316 WORKSPACE CACHE
317 ---------------
318 The TF client keeps a cache of workspaces and folder mappings in 
319 ~/.tf/Cache/VersionControl.config. Here's a sample file:
321 The contents of the cache can be seen with the *tf cache* command.
323 ------------
324 <VersionControlServer>
325   <Servers>
326     <ServerInfo uri="http://10.2.1.2:8080/">
327       <WorkspaceInfo name="neo" ownerName="DOMAIN\USER" computer="MYBOX" comment="" LastSavedCheckinTimeStamp="4/26/2007 11:55:50 PM">
328         <MappedPaths>
329           <MappedPath path="/home/jreed/Source/xyz-project" />
330           <MappedPath path="/home/jreed/Source/abc-project" />
331         </MappedPaths>
332       </WorkspaceInfo>
333     </ServerInfo>
334   </Servers>
335 </VersionControlServer>
336 ------------
339 IMPLEMENTATION NOTES
340 --------------------
341 TFS doesn't have built in support for tracking file attributes, for
342 example, whether the file is executable or not. The TF client included 
343 in this package makes use of libmagic to determine whether a file 
344 should be marked executable or not.
347 MORE INFORMATION
348 ----------------
349 http://groups.google.com/group/opentf
350 http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx
351 http://msdn2.microsoft.com/en-us/teamsystem/default.aspx
352 http://msdn2.microsoft.com/en-us/cc31bk2e(VS.80).aspx
355 AUTHOR
356 ------
357 Written by Joel Reed <joelwreed@gmail.com>
360 DOCUMENTATION
361 --------------
362 Documentation by Joel Reed <joelwreed@gmail.com>