/added | /modified | /deleted options for online command
[tfs.git] / docs / tf.txt
blob219af45ad9b91013db4019e0c3897681150450b9
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). 
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
32   cache file.
34 COMMANDS
35 --------
36 *add <filenames>*::
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
67   changeset.
69 *dir <server path>*::
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.
73 *get [ <path> ]*::
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.
92 *online <path> [ /added | /modified | /deleted | /preview ]*::
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 clean tfs-managed tree and want to pend the changes to the 
97         server for checkin. The /added, /modified, /deleted flags can be used
98         to show just additions, just modifications, or just deletions respectively.
99         These flags may be combined. With no flags, all changes are shown.
101 *perm <filename>*::
102         Show server permissions on a file. Command alias: permission.
104 *properties <filenames> [ /recursive ]*::
105         Show detailed properties for each filename including server locks, encoding,
106   last modified date, changeset id, and whether the file has a newer version
107   on the server.
109 *rename <oldname> <newname>*::
110         Rename a file or files in the repository.
112 *status [<filenames> /recursive ]*::
113   Show status of all pending changes in local workspace. Optional paths/filenames
114         may be added to narrow the resulting output.
116 *treeclean*::
117   Delete all files not under version control. Use /preview to see what 
118         would be deleted.
120 *undo* <filenames> [ /recursive ]::
121   Undo pending changes.
123 *workspace* [ /new | /delete ]::
124   Manage workspaces.
126 *workspaces [ /format:detailed ]*::
127         List workspaces in server repository. Use /format:detailed for additional
128   information.
130 *workfold [ <server path> <local path> | /unmap <local path> ]*::
131   Manage working folders. With no arguments, print current working folder 
132   mappings. With a server path and local path, creates a new working folder
133   mapping.
135 *view <filenames | server paths>*::
136         Displays the latest version of the specified file or files.
138 EXAMPLES
139 --------
141 * List all workspaces on the server 10.2.10.2, using a username of
142   "domain\\username" and a password of "password".
144 ------------
145 $  tf workspaces /server:10.2.10.2 /login:domain\\username,password \
146      /owner:"*" /computer:"*"
147 ------------
149 * Create a workspace with the name "workspaceName" with an owner name of ownerName
151 ------------
152 $  tf workspace /new "workspaceName;ownerName"
153 ------------
155 * Setup a working folder for the project "ProjectName" in directory ~/src/project
157 ------------
158 $  tf workfold "$/ProjectName" /home/username/src/project
159 ------------
161 * Fetch/Get all files in folder in project "ProjectName" to local machine.
163 ------------
164 $  tf get /recursive /home/username/src/project
165 ------------
167 * Delete the workspace "workspaceName" created above.
169 ------------
170 $  tf workspace /delete workspaceName
171 ------------
174 MULTIPLE COMMANDS
175 -----------------
176 You can execute multiple commands in sequence in a single run of TF, 
177 by separating the commands with '%'. Here's how you might checkin a 
178 patch with a single run of TF:
180 ------------
181 $  patch -p1 < ~/new-feature.diff
182 $  tf online % checkin
183 ------------
186 CONFIGURATION
187 -------------
188 The TF client stores configuration settings in ~/.tf/TfClient.config.
190 *Checkin.Validate*::
191         The TF client will display a summary of pending
192   changes and ask for confirmaton below committing changes to the server
193   when set to "true". The default is "false". It's non-trivial to rollback
194   a committed change, so this option is highly recommended.
196 *Checkout.Latest*::
197   The TF client will always checkout the latest version rather than
198   the workspace version if this setting is set to "true". Note: this option
199         only effects the checkout command, not the "online" command.
201 *Credentials.Save*:: 
202         The TF client will store login credentials if this
203   setting is set to "true". The default is "false".
205 *File.Excludes*::
206         A comma separated list of files to ignore. Currently, only the "online"
207         command honors this setting. The wildcard characters * and ? are supported.
208         Example setting: "*.dll,*.pdb".
210 *Get.Recursive*::
211         The TF client will automatically do recursive gets when set
212         to "true". IMHO, this is far more useful than the default       behavior.
214 *History.DefaultToCwd*::
215         The TF client will default to the current working directory if not options
216         are given when running the subcommand "history". The default behavior of the
217         standard client is to require a path for all history queries. This option
218   provides an optional and more sensible default.
220 *History.Recursive*::
221         The TF client will automatically do recursive history queries when set
222         to "true". IMHO, this is far more useful than the default       behavior.
224 *Online.Recursive*::
225         The TF client will automatically do a recursive online command when set
226         to "true". IMHO, this is far more useful than the default       behavior for
227         clean trees. Not as helpful for trees littered with build output files.
230 WORKSPACE CACHE
231 ---------------
232 The TF client keeps a cache of workspaces and folder mappings in 
233 ~/.tf/Cache/VersionControl.config. Here's a sample file:
235 ------------
236 <VersionControlServer>
237   <Servers>
238     <ServerInfo uri="http://10.2.1.2:8080/">
239       <WorkspaceInfo name="neo" ownerName="DOMAIN\USER" computer="MYBOX" comment="" LastSavedCheckinTimeStamp="4/26/2007 11:55:50 PM">
240         <MappedPaths>
241           <MappedPath path="/home/jreed/Source/xyz-project" />
242           <MappedPath path="/home/jreed/Source/abc-project" />
243         </MappedPaths>
244       </WorkspaceInfo>
245     </ServerInfo>
246   </Servers>
247 </VersionControlServer>
248 ------------
251 IMPLEMENTATION NOTES
252 --------------------
253 TFS doesn't have built in support for tracking file attributes, for
254 example, whether the file is executable or not. The TF client included 
255 in this package makes use of libmagic to determine whether a file 
256 should be marked executable or not.
259 MORE INFORMATION
260 ----------------
261 http://groups.google.com/group/tf4mono
262 http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx
263 http://msdn2.microsoft.com/en-us/teamsystem/default.aspx
264 http://msdn2.microsoft.com/en-us/cc31bk2e(VS.80).aspx
267 AUTHOR
268 ------
269 Written by Joel Reed <joelwreed@gmail.com>
272 DOCUMENTATION
273 --------------
274 Documentation by Joel Reed <joelwreed@gmail.com>