1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE appendix SYSTEM "../../dtd/dblite.dtd">
\r
3 <appendix id="tsvn-cli" xmlns:xi="http://www.w3.org/2001/XInclude">
\r
4 <title>Command Line Interface Cross Reference</title>
\r
7 <primary>command line client</primary>
\r
10 <primary>CLI</primary>
\r
13 Sometimes this manual refers you to the main Git
\r
14 documentation, which describes Git in terms of the
\r
15 Command Line Interface (CLI). To help you understand what
\r
16 TortoiseGit is doing behind the scenes, we have compiled
\r
17 a list showing the equivalent CLI commands for each of
\r
18 TortoiseGit's GUI operations.
\r
22 Even though there are CLI equivalents to what TortoiseGit
\r
23 does, remember that TortoiseGit does <emphasis>not</emphasis>
\r
24 call the CLI but uses the Git library directly.
\r
28 If you think you have found a bug in TortoiseGit, we
\r
29 may ask you to try to reproduce it using the CLI, so
\r
30 that we can distinguish TortoiseGit issues from Git
\r
31 issues. This reference tells you which command to try.
\r
34 <sect1 id="tsvn-cli-basics">
\r
35 <title>Conventions and Basic Rules</title>
\r
37 In the descriptions which follow, the URL for a repository
\r
38 location is shown simply as
\r
39 <literal>URL</literal>, and an example might be
\r
40 <systemitem class="url">http://TortoiseGit.tigris.org/svn/TortoiseGit/trunk</systemitem>.
\r
41 The working copy path is shown simply as
\r
42 <literal>PATH</literal>, and an example might be
\r
43 <filename>C:\TortoiseGit\trunk</filename>.
\r
47 Because TortoiseGit is a Windows Shell Extension, it is not able
\r
48 to use the notion of a current working directory. All working
\r
49 copy paths must be given using the absolute path, not a relative
\r
54 Certain items are optional, and these are often controlled by
\r
55 checkboxes or radio buttons in TortoiseGit. These options are
\r
56 shown in [square brackets] in the command line definitions.
\r
59 <sect1 id="tsvn-cli-main">
\r
60 <title>TortoiseGit Commands</title>
\r
61 <sect2 id="tsvn-cli-checkout">
\r
62 <title>Checkout</title>
\r
64 svn checkout [-N] [--ignore-externals] [-r rev] URL PATH
\r
67 If <guilabel>Only checkout the top folder</guilabel> is checked,
\r
68 use the <literal>-N</literal> switch.
\r
71 If <guilabel>Omit externals</guilabel> is checked,
\r
72 use the <literal>--ignore-externals</literal> switch.
\r
75 If you are checking out a specific revision, specify that
\r
76 after the URL using <literal>-r</literal> switch.
\r
79 <sect2 id="tsvn-cli-update">
\r
80 <title>Update</title>
\r
83 svn update [-r rev] PATH
\r
86 Updating multiple items is currently not an atomic operation
\r
88 TortoiseGit first finds the HEAD revision of the repository,
\r
89 and then updates all items to that particular revision number to
\r
90 avoid creating a mixed revision working copy.
\r
93 If only one item is selected for updating or the selected items are
\r
94 not all from the same repository, TortoiseGit just updates
\r
98 No command line options are used here.
\r
99 <guilabel>Update to revision</guilabel> also implements
\r
100 the update command, but offers more options.
\r
103 <sect2 id="tsvn-cli-updaterev">
\r
104 <title>Update to Revision</title>
\r
107 svn update [-r rev] [-N] [--ignore-externals] PATH
\r
110 If <guilabel>Only update the top folder</guilabel> is checked,
\r
111 use the <literal>-N</literal> switch.
\r
114 If <guilabel>Omit externals</guilabel> is checked,
\r
115 use the <literal>--ignore-externals</literal> switch.
\r
118 <sect2 id="tsvn-cli-commit">
\r
119 <title>Commit</title>
\r
121 In TortoiseGit, the commit dialog uses several Git commands.
\r
122 The first stage is a status check which determines the items
\r
123 in your working copy which can potentially be committed. You can
\r
124 review the list, diff files against BASE and select the items you
\r
125 want to be included in the commit.
\r
131 If <guilabel>Show unversioned files</guilabel> is checked,
\r
132 TortoiseGit will also show all unversioned files and folders in
\r
133 the working copy hierarchy, taking account of the ignore rules.
\r
134 This particular feature has no direct equivalent in Git,
\r
135 as the <literal>svn status</literal> command does not descend into
\r
136 unversioned folders.
\r
139 If you check any unversioned files and folders, those items will
\r
140 first be added to your working copy.
\r
146 When you click on OK, the Git commit takes place. If you have
\r
147 left all the file selection checkboxes in their default state,
\r
148 TortoiseGit uses a single recursive commit of the working copy.
\r
149 If you deselect some files, then a non-recursive commit
\r
150 (<literal>-N</literal>) must be used, and every path must be
\r
151 specified individually on the commit command line.
\r
154 svn commit -m "LogMessage" [-N] [--no-unlock] PATH...
\r
157 <literal>LogMessage</literal> here represents the contents of the
\r
158 log message edit box. This can be empty.
\r
161 If <guilabel>Keep locks</guilabel> is checked,
\r
162 use the <literal>--no-unlock</literal> switch.
\r
165 <sect2 id="tsvn-cli-diff">
\r
166 <title>Diff</title>
\r
171 If you use Diff from the main context menu, you are diffing
\r
172 a modified file against its BASE revision. The output from
\r
173 the CLI command above also does this and produces output
\r
174 in unified-diff format. However, this is not what TortoiseGit
\r
175 is using. TortoiseGit uses TortoiseMerge (or a diff program of
\r
176 your choosing) to display differences visually between
\r
177 full-text files, so there is no direct CLI equivalent.
\r
180 You can also diff any 2 files using TortoiseGit, whether or
\r
181 not they are version controlled. TortoiseGit just feeds the
\r
182 two files into the chosen diff program and lets it work out
\r
183 where the differences lie.
\r
186 <sect2 id="tsvn-cli-showlog">
\r
187 <title>Show Log</title>
\r
189 svn log -v -r 0:N --limit 100 [--stop-on-copy] PATH
\r
191 svn log -v -r M:N [--stop-on-copy] PATH
\r
194 By default, TortoiseGit tries to fetch 100 log messages
\r
195 using the --limit method. If the settings instruct it to
\r
196 use old APIs, then the second form is used to fetch the
\r
197 log messages for 100 repository revisions.
\r
200 If <guilabel>Stop on copy/rename</guilabel> is checked,
\r
201 use the <literal>--stop-on-copy</literal> switch.
\r
204 <sect2 id="tsvn-cli-checkmods">
\r
205 <title>Check for Modifications</title>
\r
209 svn status -u -v PATH
\r
212 The initial status check looks only at your working copy.
\r
213 If you click on <guibutton>Check repository</guibutton>
\r
214 then the repository is also checked to see which files
\r
215 would be changed by an update, which requires the
\r
216 <literal>-u</literal> switch.
\r
219 If <guilabel>Show unversioned files</guilabel> is checked,
\r
220 TortoiseGit will also show all unversioned files and folders in
\r
221 the working copy hierarchy, taking account of the ignore rules.
\r
222 This particular feature has no direct equivalent in Git,
\r
223 as the <literal>svn status</literal> command does not descend into
\r
224 unversioned folders.
\r
227 <sect2 id="tsvn-cli-revgraph">
\r
228 <title>Revision Graph</title>
\r
230 The revision graph is a feature of TortoiseGit only. There's no
\r
231 equivalent in the command line client.
\r
234 What TortoiseGit does is an
\r
239 where URL is the repository <emphasis>root</emphasis> and then
\r
240 analyzes the data returned.
\r
243 <sect2 id="tsvn-cli-repobrowser">
\r
244 <title>Repo Browser</title>
\r
247 svn list [-r rev] -v URL
\r
250 You can use <literal>svn info</literal> to determine the repository
\r
251 root, which is the top level shown in the repository browser. You
\r
252 cannot navigate <literal>Up</literal> above this level.
\r
253 Also, this command returns all the locking information shown in
\r
254 the repository browser.
\r
257 The <literal>svn list</literal> call will list the contents of a
\r
258 directory, given a URL and revision.
\r
261 <sect2 id="tsvn-cli-editconflicts">
\r
262 <title>Edit Conflicts</title>
\r
264 This command has no CLI equivalent. It invokes TortoiseMerge or
\r
265 an external 3-way diff/merge tool to look at the files involved
\r
266 in the conflict and sort out which lines to use.
\r
269 <sect2 id="tsvn-cli-resolved">
\r
270 <title>Resolved</title>
\r
275 <sect2 id="tsvn-cli-rename">
\r
276 <title>Rename</title>
\r
278 svn rename CURR_PATH NEW_PATH
\r
281 <sect2 id="tsvn-cli-delete">
\r
282 <title>Delete</title>
\r
287 <sect2 id="tsvn-cli-revert">
\r
288 <title>Revert</title>
\r
293 The first stage is a status check which determines the items
\r
294 in your working copy which can potentially be reverted. You can
\r
295 review the list, diff files against BASE and select the items you
\r
296 want to be included in the revert.
\r
299 When you click on OK, the Git revert takes place. If you have
\r
300 left all the file selection checkboxes in their default state,
\r
301 TortoiseGit uses a single recursive (<literal>-R</literal>)
\r
302 revert of the working copy. If you deselect some files, then
\r
303 every path must be specified individually on the revert command line.
\r
306 svn revert [-R] PATH...
\r
309 <sect2 id="tsvn-cli-cleanup">
\r
310 <title>Cleanup</title>
\r
315 <sect2 id="tsvn-cli-getlock">
\r
316 <title>Get Lock</title>
\r
321 The first stage is a status check which determines the files
\r
322 in your working copy which can potentially be locked. You can
\r
323 select the items you want to be locked.
\r
326 svn lock -m "LockMessage" [--force] PATH...
\r
329 <literal>LockMessage</literal> here represents the contents of the
\r
330 lock message edit box. This can be empty.
\r
333 If <guilabel>Steal the locks</guilabel> is checked,
\r
334 use the <literal>--force</literal> switch.
\r
337 <sect2 id="tsvn-cli-release">
\r
338 <title>Release Lock</title>
\r
343 <sect2 id="tsvn-cli-branchtag">
\r
344 <title>Branch/Tag</title>
\r
346 svn copy -m "LogMessage" URL URL
\r
348 svn copy -m "LogMessage" URL@rev URL@rev
\r
350 svn copy -m "LogMessage" PATH URL
\r
353 The Branch/Tag dialog performs a copy to the repository.
\r
354 There are 3 radio button options:
\r
356 <listitem>HEAD revision in the repository</listitem>
\r
357 <listitem>Specific revision in repository</listitem>
\r
358 <listitem>Working copy</listitem>
\r
360 which correspond to the 3 command line variants above.
\r
363 <literal>LogMessage</literal> here represents the contents of the
\r
364 log message edit box. This can be empty.
\r
367 <sect2 id="tsvn-cli-switch">
\r
368 <title>Switch</title>
\r
371 svn switch [-r rev] URL PATH
\r
374 <sect2 id="tsvn-cli-merge">
\r
375 <title>Merge</title>
\r
377 svn merge [--dry-run] --force From_URL@revN To_URL@revM PATH
\r
380 The <guibutton>Test Merge</guibutton> performs the same merge
\r
381 with the <literal>--dry-run</literal> switch.
\r
384 svn diff From_URL@revN To_URL@revM
\r
387 The <guibutton>Unified diff</guibutton> shows the diff
\r
388 operation which will be used to do the merge.
\r
391 <sect2 id="tsvn-cli-export">
\r
392 <title>Export</title>
\r
394 svn export [-r rev] [--ignore-externals] URL Export_PATH
\r
397 This form is used when accessed from an unversioned folder,
\r
398 and the folder is used as the destination.
\r
401 Exporting a working copy to a different location is done without
\r
402 using the Git library, so there's no matching command
\r
406 What TortoiseGit does is to copy all files to the new location
\r
407 while showing you the progress of the operation. Unversioned
\r
408 files/folders can optionally be exported too.
\r
412 if <guilabel>Omit externals</guilabel> is checked,
\r
413 use the <literal>--ignore-externals</literal> switch.
\r
416 <sect2 id="tsvn-cli-relocate">
\r
417 <title>Relocate</title>
\r
419 svn switch --relocate From_URL To_URL
\r
422 <sect2 id="tsvn-cli-createrepos">
\r
423 <title>Create Repository Here</title>
\r
425 svnadmin create --fs-type fsfs PATH
\r
428 <sect2 id="tsvn-cli-add">
\r
434 If you selected a folder, TortoiseGit first scans it
\r
435 recursively for items which can be added.
\r
438 <sect2 id="tsvn-cli-import">
\r
439 <title>Import</title>
\r
441 svn import -m LogMessage PATH URL
\r
444 <literal>LogMessage</literal> here represents the contents of the
\r
445 log message edit box. This can be empty.
\r
448 <sect2 id="tsvn-cli-blame">
\r
449 <title>Blame</title>
\r
451 svn blame -r N:M -v PATH
\r
452 svn log -r N:M PATH
\r
455 If you use TortoiseBlame to view the blame info, the file
\r
456 log is also required to show log messages in a tooltip.
\r
457 If you view blame as a text file, this information is not
\r
461 <sect2 id="tsvn-cli-addignore">
\r
462 <title>Add to Ignore List</title>
\r
464 svn propget svn:ignore PATH > tempfile
\r
465 {edit new ignore item into tempfile}
\r
466 svn propset svn:ignore -F tempfile PATH
\r
469 Because the <literal>svn:ignore</literal> property is often
\r
470 a multi-line value, it is shown here as being changed via
\r
471 a text file rather than directly on the command line.
\r
474 <sect2 id="tsvn-cli-createpatch">
\r
475 <title>Create Patch</title>
\r
477 svn diff PATH > patch-file
\r
480 TortoiseGit creates a patch file in unified diff format
\r
481 by comparing the working copy with its BASE version.
\r
484 <sect2 id="tsvn-cli-applypatch">
\r
485 <title>Apply Patch</title>
\r
487 Applying patches is a tricky business unless the patch
\r
488 and working copy are at the same revision. Luckily for
\r
489 you, you can use TortoiseMerge, which has no direct
\r
497 sgml-parent-document: ("book.xml" "appendix")
\r