blob: 89a5068ec4edf0b36f3f6e3b445d7728f8022af4 [file] [log] [blame]
Junio C Hamano9ae1a062006-07-10 08:12:341<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Junio C Hamanoba4b9282008-07-06 05:20:316<meta name="generator" content="AsciiDoc 8.2.5" />
Junio C Hamano9ae1a062006-07-10 08:12:347<style type="text/css">
8/* Debug borders */
9p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10/*
11 border: 1px solid red;
12*/
13}
14
15body {
16 margin: 1em 5% 1em 5%;
17}
18
Junio C Hamanoba4b9282008-07-06 05:20:3119a {
20 color: blue;
21 text-decoration: underline;
22}
23a:visited {
24 color: fuchsia;
25}
Junio C Hamano9ae1a062006-07-10 08:12:3426
27em {
28 font-style: italic;
29}
30
31strong {
32 font-weight: bold;
33}
34
35tt {
36 color: navy;
37}
38
39h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
45}
46
Junio C Hamanoba4b9282008-07-06 05:20:3147h1, h2, h3 {
Junio C Hamano9ae1a062006-07-10 08:12:3448 border-bottom: 2px solid silver;
49}
50h2 {
Junio C Hamano9ae1a062006-07-10 08:12:3451 padding-top: 0.5em;
52}
Junio C Hamanoba4b9282008-07-06 05:20:3153h3 {
54 float: left;
55}
56h3 + * {
57 clear: left;
58}
Junio C Hamano9ae1a062006-07-10 08:12:3459
60div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
63}
64
65hr {
66 border: 1px solid silver;
67}
68
69p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
72}
73
74pre {
75 padding: 0;
76 margin: 0;
77}
78
79span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3183 font-size: 1.1em;
Junio C Hamano9ae1a062006-07-10 08:12:3484}
85span#email {
86}
87span#revision {
88 font-family: sans-serif;
89}
90
91div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
97}
98div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
101}
102div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
105}
106
107div#preamble,
108div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
114}
115div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
118}
119
120div.content { /* Block element content. */
121 padding: 0;
122}
123
124/* Block element titles. */
125div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
131}
132div.title + * {
133 margin-top: 0;
134}
135
136td div.title:first-child {
137 margin-top: 0.0em;
138}
139div.content div.title:first-child {
140 margin-top: 0.0em;
141}
142div.content + div.title {
143 margin-top: 0.0em;
144}
145
146div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
150}
151
Junio C Hamanoba4b9282008-07-06 05:20:31152div.listingblock {
153 margin-right: 0%;
154}
Junio C Hamano9ae1a062006-07-10 08:12:34155div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
159}
160
161div.quoteblock > div.content {
162 padding-left: 2.0em;
163}
Junio C Hamanoba4b9282008-07-06 05:20:31164
165div.attribution {
Junio C Hamano9ae1a062006-07-10 08:12:34166 text-align: right;
167}
Junio C Hamanoba4b9282008-07-06 05:20:31168div.verseblock + div.attribution {
169 text-align: left;
170}
Junio C Hamano9ae1a062006-07-10 08:12:34171
172div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
179}
180div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
183}
184
185div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
188}
189
190div.verseblock div.content {
191 white-space: pre;
192}
193
194div.imageblock div.content { padding-left: 0; }
195div.imageblock img { border: 1px solid silver; }
196span.image img { border-style: none; }
197
198dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
201}
202dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
206}
207dd > *:first-child {
208 margin-top: 0;
209}
210
211ul, ol {
212 list-style-position: outside;
213}
Junio C Hamanoba4b9282008-07-06 05:20:31214div.olist2 ol {
Junio C Hamano9ae1a062006-07-10 08:12:34215 list-style-type: lower-alpha;
216}
217
218div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31219 border: 3px solid #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:34220}
221thead {
222 font-family: sans-serif;
223 font-weight: bold;
224}
225tfoot {
226 font-weight: bold;
227}
228
229div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
Junio C Hamanoba4b9282008-07-06 05:20:31233div.hlist td {
234 padding-bottom: 5px;
235}
Junio C Hamano9ae1a062006-07-10 08:12:34236td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
240}
241td.hlist2 {
242 vertical-align: top;
243}
244
245@media print {
246 div#footer-badges { display: none; }
247}
Junio C Hamanoba4b9282008-07-06 05:20:31248
249div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
256}
257
258div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
261}
262div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
265}
266div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
269}
270div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
273}
274include1::./stylesheets/xhtml11-manpage.css[]
Junio C Hamano9ae1a062006-07-10 08:12:34275/* Workarounds for IE6's broken and incomplete CSS2. */
276
277div.sidebar-content {
278 background: #ffffee;
279 border: 1px solid silver;
280 padding: 0.5em;
281}
282div.sidebar-title, div.image-title {
283 font-family: sans-serif;
284 font-weight: bold;
285 margin-top: 0.0em;
286 margin-bottom: 0.5em;
287}
288
289div.listingblock div.content {
290 border: 1px solid silver;
291 background: #f4f4f4;
292 padding: 0.5em;
293}
294
295div.quoteblock-content {
296 padding-left: 2.0em;
297}
298
299div.exampleblock-content {
300 border-left: 2px solid silver;
301 padding-left: 0.5em;
302}
Junio C Hamanoba4b9282008-07-06 05:20:31303
304/* IE6 sets dynamically generated links as visited. */
305div#toc a:visited { color: blue; }
Junio C Hamano9ae1a062006-07-10 08:12:34306</style>
307<title>git-svn(1)</title>
308</head>
309<body>
310<div id="header">
311<h1>
312git-svn(1) Manual Page
313</h1>
314<h2>NAME</h2>
315<div class="sectionbody">
316<p>git-svn -
Junio C Hamano7c73c662007-01-19 00:37:50317 Bidirectional operation between a single Subversion branch and git
Junio C Hamano9ae1a062006-07-10 08:12:34318</p>
319</div>
320</div>
321<h2>SYNOPSIS</h2>
322<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31323<div class="para"><p><em>git svn</em> &lt;command&gt; [options] [arguments]</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34324</div>
Junio C Hamanoba4b9282008-07-06 05:20:31325<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34326<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31327<div class="para"><p><em>git-svn</em> is a simple conduit for changesets between Subversion and git.
Junio C Hamano7f80ae82008-07-30 18:31:35328It provides a bidirectional flow of changes between a Subversion and a git
Junio C Hamanocb1c44f2008-08-06 06:19:33329repository.</p></div>
Junio C Hamano7f80ae82008-07-30 18:31:35330<div class="para"><p><em>git-svn</em> can track a single Subversion branch simply by using a
331URL to the branch, follow branches laid out in the Subversion recommended
332method (trunk, branches, tags directories) with the --stdlayout option, or
333follow branches in any layout with the -T/-t/-b options (see options to
334<em>init</em> below, and also the <em>clone</em> command).</p></div>
335<div class="para"><p>Once tracking a Subversion branch (with any of the above methods), the git
336repository can be updated from Subversion by the <em>fetch</em> command and
337Subversion updated from git by the <em>dcommit</em> command.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34338</div>
Junio C Hamanoba4b9282008-07-06 05:20:31339<h2 id="_commands">COMMANDS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34340<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31341<div class="vlist"><dl>
Junio C Hamano9ae1a062006-07-10 08:12:34342<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31343<em>init</em>
Junio C Hamano9ae1a062006-07-10 08:12:34344</dt>
345<dd>
346<p>
Junio C Hamano00cb3712007-02-23 11:13:52347 Initializes an empty git repository with additional
Junio C Hamanoba4b9282008-07-06 05:20:31348 metadata directories for <em>git-svn</em>. The Subversion URL
Junio C Hamano00cb3712007-02-23 11:13:52349 may be specified as a command-line argument, or as full
350 URL arguments to -T/-t/-b. Optionally, the target
351 directory to operate on can be specified as a second
352 argument. Normally this command initializes the current
353 directory.
Junio C Hamano9ae1a062006-07-10 08:12:34354</p>
Junio C Hamanoba4b9282008-07-06 05:20:31355<div class="vlist"><dl>
Junio C Hamano9ae1a062006-07-10 08:12:34356<dt>
Junio C Hamano00cb3712007-02-23 11:13:52357-T&lt;trunk_subdir&gt;
358</dt>
359<dt>
360--trunk=&lt;trunk_subdir&gt;
361</dt>
362<dt>
363-t&lt;tags_subdir&gt;
364</dt>
365<dt>
366--tags=&lt;tags_subdir&gt;
367</dt>
368<dt>
369-b&lt;branches_subdir&gt;
370</dt>
371<dt>
372--branches=&lt;branches_subdir&gt;
373</dt>
Junio C Hamano377018d2007-08-23 08:41:31374<dt>
375-s
376</dt>
377<dt>
378--stdlayout
379</dt>
Junio C Hamano00cb3712007-02-23 11:13:52380<dd>
381<p>
382 These are optional command-line options for init. Each of
383 these flags can point to a relative repository path
384 (--tags=project/tags') or a full url
Junio C Hamano377018d2007-08-23 08:41:31385 (--tags=https://foo.org/project/tags). The option --stdlayout is
386 a shorthand way of setting trunk,tags,branches as the relative paths,
387 which is the Subversion default. If any of the other options are given
388 as well, they take precedence.
Junio C Hamano00cb3712007-02-23 11:13:52389</p>
390</dd>
391<dt>
392--no-metadata
393</dt>
394<dd>
395<p>
396 Set the <em>noMetadata</em> option in the [svn-remote] config.
397</p>
398</dd>
399<dt>
400--use-svm-props
401</dt>
402<dd>
403<p>
404 Set the <em>useSvmProps</em> option in the [svn-remote] config.
405</p>
406</dd>
407<dt>
408--use-svnsync-props
409</dt>
410<dd>
411<p>
412 Set the <em>useSvnsyncProps</em> option in the [svn-remote] config.
413</p>
414</dd>
415<dt>
416--rewrite-root=&lt;URL&gt;
417</dt>
418<dd>
419<p>
420 Set the <em>rewriteRoot</em> option in the [svn-remote] config.
421</p>
422</dd>
423<dt>
Junio C Hamanodfccbb02008-05-26 01:16:14424--use-log-author
425</dt>
426<dd>
427<p>
428 When retrieving svn commits into git (as part of fetch, rebase, or
429 dcommit operations), look for the first From: or Signed-off-by: line
430 in the log message and use that as the author string.
431</p>
432</dd>
433<dt>
434--add-author-from
435</dt>
436<dd>
437<p>
438 When committing to svn from git (as part of commit or dcommit
439 operations), if the existing log message doesn't already have a
440 From: or Signed-off-by: line, append a From: line based on the
441 git commit's author string. If you use this, then --use-log-author
442 will retrieve a valid author string for all commits.
443</p>
444</dd>
445<dt>
Junio C Hamano00cb3712007-02-23 11:13:52446--username=&lt;USER&gt;
447</dt>
448<dd>
449<p>
450 For transports that SVN handles authentication for (http,
451 https, and plain svn), specify the username. For other
452 transports (eg svn+ssh://), you must include the username in
453 the URL, eg svn+ssh://foo@svn.bar.com/project
454</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36455</dd>
456<dt>
457--prefix=&lt;prefix&gt;
458</dt>
459<dd>
460<p>
Junio C Hamano00cb3712007-02-23 11:13:52461 This allows one to specify a prefix which is prepended
462 to the names of remotes if trunk/branches/tags are
463 specified. The prefix does not automatically include a
464 trailing slash, so be sure you include one in the
Junio C Hamano0a2ad892007-06-24 22:23:12465 argument if that is what you want. If --branches/-b is
466 specified, the prefix must include a trailing slash.
467 Setting a prefix is useful if you wish to track multiple
468 projects that share a common repository.
Junio C Hamanoa3fd83c2007-03-02 10:34:36469</p>
Junio C Hamano00cb3712007-02-23 11:13:52470</dd>
Junio C Hamano55344412009-04-12 18:31:19471<dt>
472--ignore-paths=&lt;regex&gt;
473</dt>
474<dd>
475<p>
476 When passed to <em>init</em> or <em>clone</em> this regular expression will
477 be preserved as a config key. See <em>fetch</em> for a description
478 of <em>--ignore-paths</em>.
479</p>
480</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31481</dl></div>
Junio C Hamano67fad6d2007-05-06 08:53:12482</dd>
Junio C Hamano00cb3712007-02-23 11:13:52483<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31484<em>fetch</em>
Junio C Hamano9ae1a062006-07-10 08:12:34485</dt>
486<dd>
487<p>
Junio C Hamano00cb3712007-02-23 11:13:52488 Fetch unfetched revisions from the Subversion remote we are
489 tracking. The name of the [svn-remote "&#8230;"] section in the
490 .git/config file may be specified as an optional command-line
491 argument.
Junio C Hamano9ae1a062006-07-10 08:12:34492</p>
Junio C Hamano8f4ac0d2009-01-19 08:35:36493<div class="vlist"><dl>
494<dt>
495--localtime
496</dt>
497<dd>
498<p>
499 Store Git commit times in the local timezone instead of UTC. This
500 makes <em>git-log</em> (even without --date=local) show the same times
501 that <tt>svn log</tt> would in the local timezone.
502</p>
Junio C Hamano55344412009-04-12 18:31:19503</dd>
504<dt>
505--parent
506</dt>
507<dd>
508<p>
509 Fetch only from the SVN parent of the current HEAD.
510</p>
Junio C Hamano8f4ac0d2009-01-19 08:35:36511<div class="para"><p>This doesn't interfere with interoperating with the Subversion
512repository you cloned from, but if you wish for your local Git
513repository to be able to interoperate with someone else's local Git
514repository, either don't use this option or you should both use it in
515the same local timezone.</p></div>
516</dd>
Junio C Hamanoa07e8162009-01-26 17:36:43517<dt>
518--ignore-paths=&lt;regex&gt;
519</dt>
520<dd>
521<p>
Junio C Hamano55344412009-04-12 18:31:19522 This allows one to specify a Perl regular expression that will
Junio C Hamanoa07e8162009-01-26 17:36:43523 cause skipping of all matching paths from checkout from SVN.
Junio C Hamano55344412009-04-12 18:31:19524 The <em>--ignore-paths</em> option should match for every <em>fetch</em>
525 (including automatic fetches due to <em>clone</em>, <em>dcommit</em>,
526 <em>rebase</em>, etc) on a given repository.
Junio C Hamanoa07e8162009-01-26 17:36:43527</p>
Junio C Hamano55344412009-04-12 18:31:19528<div class="para"><p>config key: svn-remote.&lt;name&gt;.ignore-paths</p></div>
Junio C Hamanoa07e8162009-01-26 17:36:43529<div class="literalblock">
530<div class="content">
Junio C Hamano55344412009-04-12 18:31:19531<pre><tt>If the ignore-paths config key is set and the command
532line option is also given, both regular expressions
533will be used.</tt></pre>
534</div></div>
535<div class="para"><p>Examples:</p></div>
536<div class="literalblock">
537<div class="content">
538<pre><tt>--ignore-paths="^doc" - skip "doc*" directory for every
539 fetch.</tt></pre>
Junio C Hamanoa07e8162009-01-26 17:36:43540</div></div>
541<div class="literalblock">
542<div class="content">
Junio C Hamano55344412009-04-12 18:31:19543<pre><tt>--ignore-paths="^[^/]+/(?:branches|tags)" - skip
544 "branches" and "tags" of first level directories.</tt></pre>
Junio C Hamanoa07e8162009-01-26 17:36:43545</div></div>
546</dd>
Junio C Hamano8f4ac0d2009-01-19 08:35:36547</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:52548</dd>
549<dt>
550<em>clone</em>
551</dt>
552<dd>
553<p>
554 Runs <em>init</em> and <em>fetch</em>. It will automatically create a
555 directory based on the basename of the URL passed to it;
556 or if a second argument is passed; it will create a directory
557 and work within that. It accepts all arguments that the
558 <em>init</em> and <em>fetch</em> commands accept; with the exception of
559 <em>--fetch-all</em>. After a repository is cloned, the <em>fetch</em>
560 command will be able to update revisions without affecting
561 the working tree; and the <em>rebase</em> command will be able
562 to update the working tree with the latest changes.
563</p>
564</dd>
565<dt>
566<em>rebase</em>
567</dt>
568<dd>
569<p>
570 This fetches revisions from the SVN parent of the current HEAD
571 and rebases the current (uncommitted to SVN) work against it.
572</p>
Junio C Hamanoba4b9282008-07-06 05:20:31573<div class="para"><p>This works similarly to <tt>svn update</tt> or <em>git-pull</em> except that
574it preserves linear history with <em>git-rebase</em> instead of
Junio C Hamano610d1762008-11-28 06:27:13575<em>git-merge</em> for ease of dcommitting with <em>git-svn</em>.</p></div>
Junio C Hamanoba4b9282008-07-06 05:20:31576<div class="para"><p>This accepts all options that <em>git-svn fetch</em> and <em>git-rebase</em>
Junio C Hamanofce7c7e2008-07-02 03:06:38577accept. However, <em>--fetch-all</em> only fetches from the current
Junio C Hamanoba4b9282008-07-06 05:20:31578[svn-remote], and not all [svn-remote] definitions.</p></div>
579<div class="para"><p>Like <em>git-rebase</em>; this requires that the working tree be clean
580and have no uncommitted changes.</p></div>
581<div class="vlist"><dl>
Junio C Hamano103ad7f2007-03-14 11:19:26582<dt>
583-l
584</dt>
585<dt>
586--local
587</dt>
588<dd>
589<p>
Junio C Hamanoba4b9282008-07-06 05:20:31590 Do not fetch remotely; only run <em>git-rebase</em> against the
Junio C Hamano103ad7f2007-03-14 11:19:26591 last fetched commit from the upstream SVN.
592</p>
593</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31594</dl></div>
Junio C Hamano67fad6d2007-05-06 08:53:12595</dd>
Junio C Hamano9ae1a062006-07-10 08:12:34596<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31597<em>dcommit</em>
598</dt>
599<dd>
600<p>
Junio C Hamano79770b62007-01-07 07:43:58601 Commit each diff from a specified head directly to the SVN
Junio C Hamano6b2cee12006-08-26 08:43:31602 repository, and then rebase or reset (depending on whether or
Junio C Hamano79770b62007-01-07 07:43:58603 not there is a diff between SVN and head). This will create
604 a revision in SVN for each commit in git.
Junio C Hamanoba4b9282008-07-06 05:20:31605 It is recommended that you run <em>git-svn</em> fetch and rebase (not
Junio C Hamano79770b62007-01-07 07:43:58606 pull or merge) your commits against the latest changes in the
607 SVN repository.
Junio C Hamano511162f2006-12-13 06:35:48608 An optional command-line argument may be specified as an
609 alternative to HEAD.
Junio C Hamano4bf6dca2006-12-21 02:25:57610 This is advantageous over <em>set-tree</em> (below) because it produces
Junio C Hamano67fad6d2007-05-06 08:53:12611 cleaner, more linear history.<br />
Junio C Hamano6b2cee12006-08-26 08:43:31612</p>
Junio C Hamanoba4b9282008-07-06 05:20:31613<div class="vlist"><dl>
Junio C Hamano67fad6d2007-05-06 08:53:12614<dt>
615--no-rebase
616</dt>
617<dd>
618<p>
619 After committing, do not rebase or reset.
620</p>
621</dd>
Junio C Hamanofaa1e502008-08-10 03:55:58622<dt>
623--commit-url &lt;URL&gt;
624</dt>
625<dd>
626<p>
627 Commit to this SVN URL (the full path). This is intended to
628 allow existing git-svn repositories created with one transport
629 method (e.g. <tt>svn://</tt> or <tt>http://</tt> for anonymous read) to be
630 reused if a user is later given access to an alternate transport
631 method (e.g. <tt>svn+ssh://</tt> or <tt>https://</tt>) for commit.
632</p>
Junio C Hamanoa50c35c2009-02-24 07:37:05633<div class="para"><p>config key: svn-remote.&lt;name&gt;.commiturl</p></div>
634<div class="para"><p>config key: svn.commiturl (overwrites all svn-remote.&lt;name&gt;.commiturl options)</p></div>
Junio C Hamanofaa1e502008-08-10 03:55:58635<div class="literalblock">
636<div class="content">
637<pre><tt>Using this option for any other purpose (don't ask)
638is very strongly discouraged.</tt></pre>
639</div></div>
640</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31641</dl></div>
Junio C Hamano6b2cee12006-08-26 08:43:31642</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31643</dl></div>
644<div class="vlist"><dl>
Junio C Hamano6b2cee12006-08-26 08:43:31645<dt>
Junio C Hamanoa476efa2008-10-10 15:31:42646<em>branch</em>
647</dt>
648<dd>
649<p>
650 Create a branch in the SVN repository.
651</p>
652<div class="vlist"><dl>
653<dt>
654-m
655</dt>
656<dt>
657--message
658</dt>
659<dd>
660<p>
661 Allows to specify the commit message.
662</p>
663</dd>
664<dt>
665-t
666</dt>
667<dt>
668--tag
669</dt>
670<dd>
671<p>
672 Create a tag by using the tags_subdir instead of the branches_subdir
673 specified during git svn init.
674</p>
675</dd>
676</dl></div>
677</dd>
678<dt>
679<em>tag</em>
680</dt>
681<dd>
682<p>
683 Create a tag in the SVN repository. This is a shorthand for
684 <em>branch -t</em>.
685</p>
686</dd>
687<dt>
Junio C Hamano43d01342006-10-12 04:07:32688<em>log</em>
689</dt>
690<dd>
691<p>
692 This should make it easy to look up svn log messages when svn
693 users refer to -r/--revision numbers.
694</p>
Junio C Hamanoba4b9282008-07-06 05:20:31695<div class="para"><p>The following features from `svn log' are supported:</p></div>
696<div class="vlist"><dl>
Junio C Hamanoa3fd83c2007-03-02 10:34:36697<dt>
698--revision=&lt;n&gt;[:&lt;n&gt;]
699</dt>
700<dd>
701<p>
702 is supported, non-numeric args are not:
703 HEAD, NEXT, BASE, PREV, etc &#8230;
704</p>
Junio C Hamano43d01342006-10-12 04:07:32705</dd>
706<dt>
Junio C Hamanoa3fd83c2007-03-02 10:34:36707-v/--verbose
708</dt>
709<dd>
710<p>
711 it's not completely compatible with the --verbose
712 output in svn log, but reasonably close.
713</p>
714</dd>
715<dt>
716--limit=&lt;n&gt;
717</dt>
718<dd>
719<p>
720 is NOT the same as --max-count, doesn't count
721 merged/excluded commits
722</p>
723</dd>
724<dt>
725--incremental
726</dt>
727<dd>
728<p>
729 supported
730</p>
731</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31732</dl></div>
733<div class="para"><p>New features:</p></div>
734<div class="vlist"><dl>
Junio C Hamanoa3fd83c2007-03-02 10:34:36735<dt>
736--show-commit
737</dt>
738<dd>
739<p>
740 shows the git commit sha1, as well
741</p>
742</dd>
743<dt>
744--oneline
745</dt>
746<dd>
747<p>
748 our version of --pretty=oneline
749</p>
750</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31751</dl></div>
Junio C Hamano24bc09a2008-02-28 00:27:44752<div class="admonitionblock">
753<table><tr>
754<td class="icon">
755<div class="title">Note</div>
756</td>
757<td class="content">SVN itself only stores times in UTC and nothing else. The regular svn
758client converts the UTC time to the local time (or based on the TZ=
759environment). This command has the same behaviour.</td>
760</tr></table>
761</div>
Junio C Hamanoba4b9282008-07-06 05:20:31762<div class="para"><p>Any other arguments are passed directly to <em>git-log</em></p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:36763</dd>
Junio C Hamano9c334152008-02-12 03:18:52764<dt>
765<em>blame</em>
766</dt>
767<dd>
768<p>
Junio C Hamano869bb802008-05-12 00:29:47769 Show what revision and author last modified each line of a file. The
770 output of this mode is format-compatible with the output of
Junio C Hamanoba4b9282008-07-06 05:20:31771 `svn blame' by default. Like the SVN blame command,
Junio C Hamano869bb802008-05-12 00:29:47772 local uncommitted changes in the working copy are ignored;
773 the version of the file in the HEAD revision is annotated. Unknown
Junio C Hamanoba4b9282008-07-06 05:20:31774 arguments are passed directly to <em>git-blame</em>.
Junio C Hamano9c334152008-02-12 03:18:52775</p>
Junio C Hamanoba4b9282008-07-06 05:20:31776<div class="vlist"><dl>
Junio C Hamano869bb802008-05-12 00:29:47777<dt>
778--git-format
779</dt>
780<dd>
781<p>
Junio C Hamanoba4b9282008-07-06 05:20:31782 Produce output in the same format as <em>git-blame</em>, but with
Junio C Hamano869bb802008-05-12 00:29:47783 SVN revision numbers instead of git commit hashes. In this mode,
784 changes that haven't been committed to SVN (including local
785 working-copy edits) are shown as revision 0.
786</p>
787</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31788</dl></div>
Junio C Hamano9c334152008-02-12 03:18:52789</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31790</dl></div>
791<div class="vlist"><dl>
Junio C Hamanoa3fd83c2007-03-02 10:34:36792<dt>
Junio C Hamano469d60e2007-04-29 18:30:34793<em>find-rev</em>
794</dt>
795<dd>
796<p>
797 When given an SVN revision number of the form <em>rN</em>, returns the
Junio C Hamanob63afff2007-05-01 03:05:55798 corresponding git commit hash (this can optionally be followed by a
799 tree-ish to specify which branch should be searched). When given a
800 tree-ish, returns the corresponding SVN revision number.
Junio C Hamano469d60e2007-04-29 18:30:34801</p>
802</dd>
803<dt>
Junio C Hamano4bf6dca2006-12-21 02:25:57804<em>set-tree</em>
Junio C Hamano9ae1a062006-07-10 08:12:34805</dt>
806<dd>
807<p>
Junio C Hamano43d01342006-10-12 04:07:32808 You should consider using <em>dcommit</em> instead of this command.
Junio C Hamano9ae1a062006-07-10 08:12:34809 Commit specified commit or tree objects to SVN. This relies on
810 your imported fetch data being up-to-date. This makes
811 absolutely no attempts to do patching when committing to SVN, it
812 simply overwrites files with those specified in the tree or
813 commit. All merging is assumed to have taken place
Junio C Hamanoba4b9282008-07-06 05:20:31814 independently of <em>git-svn</em> functions.
Junio C Hamano9ae1a062006-07-10 08:12:34815</p>
816</dd>
817<dt>
Junio C Hamano47d68a52008-05-06 06:35:40818<em>create-ignore</em>
819</dt>
820<dd>
821<p>
822 Recursively finds the svn:ignore property on directories and
823 creates matching .gitignore files. The resulting files are staged to
Junio C Hamanofeeb1be2008-05-22 00:53:35824 be committed, but are not committed. Use -r/--revision to refer to a
Junio C Hamanocb1c44f2008-08-06 06:19:33825 specific revision.
Junio C Hamano47d68a52008-05-06 06:35:40826</p>
827</dd>
828<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31829<em>show-ignore</em>
Junio C Hamano9ae1a062006-07-10 08:12:34830</dt>
831<dd>
832<p>
833 Recursively finds and lists the svn:ignore property on
834 directories. The output is suitable for appending to
835 the $GIT_DIR/info/exclude file.
836</p>
837</dd>
Junio C Hamano43d01342006-10-12 04:07:32838<dt>
839<em>commit-diff</em>
840</dt>
841<dd>
842<p>
843 Commits the diff of two tree-ish arguments from the
Junio C Hamano7f80ae82008-07-30 18:31:35844 command-line. This command does not rely on being inside an <tt>git-svn
Junio C Hamanofce7c7e2008-07-02 03:06:38845 init</tt>-ed repository. This command takes three arguments, (a) the
Junio C Hamano43d01342006-10-12 04:07:32846 original tree to diff against, (b) the new tree result, (c) the
847 URL of the target Subversion repository. The final argument
Junio C Hamanoba4b9282008-07-06 05:20:31848 (URL) may be omitted if you are working from a <em>git-svn</em>-aware
849 repository (that has been <tt>init</tt>-ed with <em>git-svn</em>).
Junio C Hamano23db8852006-11-09 23:35:53850 The -r&lt;revision&gt; option is required for this.
Junio C Hamano43d01342006-10-12 04:07:32851</p>
852</dd>
Junio C Hamanoa0970542007-11-23 08:43:30853<dt>
854<em>info</em>
855</dt>
856<dd>
857<p>
858 Shows information about a file or directory similar to what
859 `svn info' provides. Does not currently support a -r/--revision
860 argument. Use the --url option to output only the value of the
861 <em>URL:</em> field.
862</p>
863</dd>
Junio C Hamanofeeb1be2008-05-22 00:53:35864<dt>
865<em>proplist</em>
866</dt>
867<dd>
868<p>
869 Lists the properties stored in the Subversion repository about a
870 given file or directory. Use -r/--revision to refer to a specific
871 Subversion revision.
872</p>
873</dd>
874<dt>
875<em>propget</em>
876</dt>
877<dd>
878<p>
879 Gets the Subversion property given as the first argument, for a
880 file. A specific revision can be specified with -r/--revision.
881</p>
882</dd>
883<dt>
884<em>show-externals</em>
885</dt>
886<dd>
887<p>
888 Shows the Subversion externals. Use -r/--revision to specify a
889 specific revision.
890</p>
891</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31892</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:34893</div>
Junio C Hamanoba4b9282008-07-06 05:20:31894<h2 id="_options">OPTIONS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34895<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31896<div class="vlist"><dl>
Junio C Hamano9ae1a062006-07-10 08:12:34897<dt>
Junio C Hamano00cb3712007-02-23 11:13:52898--shared[={false|true|umask|group|all|world|everybody}]
Junio C Hamano43d01342006-10-12 04:07:32899</dt>
900<dt>
901--template=&lt;template_directory&gt;
902</dt>
903<dd>
904<p>
905 Only used with the <em>init</em> command.
Junio C Hamanoba4b9282008-07-06 05:20:31906 These are passed directly to <em>git-init</em>.
Junio C Hamano43d01342006-10-12 04:07:32907</p>
908</dd>
909<dt>
Junio C Hamano9ae1a062006-07-10 08:12:34910-r &lt;ARG&gt;
911</dt>
912<dt>
913--revision &lt;ARG&gt;
914</dt>
915<dd>
916<p>
Junio C Hamano00cb3712007-02-23 11:13:52917Used with the <em>fetch</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:34918</p>
Junio C Hamanoba4b9282008-07-06 05:20:31919<div class="para"><p>This allows revision ranges for partial/cauterized history
Junio C Hamano00cb3712007-02-23 11:13:52920to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges),
Junio C Hamanoba4b9282008-07-06 05:20:31921$NUMBER:HEAD, and BASE:$NUMBER are all supported.</p></div>
922<div class="para"><p>This can allow you to make partial mirrors when running fetch;
Junio C Hamano00cb3712007-02-23 11:13:52923but is generally not recommended because history will be skipped
Junio C Hamanoba4b9282008-07-06 05:20:31924and lost.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34925</dd>
926<dt>
927-
928</dt>
929<dt>
930--stdin
931</dt>
932<dd>
933<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57934Only used with the <em>set-tree</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:34935</p>
Junio C Hamanoba4b9282008-07-06 05:20:31936<div class="para"><p>Read a list of commits from stdin and commit them in reverse
Junio C Hamano9ae1a062006-07-10 08:12:34937order. Only the leading sha1 is read from each line, so
Junio C Hamanoba4b9282008-07-06 05:20:31938<em>git-rev-list --pretty=oneline</em> output can be used.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34939</dd>
940<dt>
941--rmdir
942</dt>
943<dd>
944<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57945Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:34946</p>
Junio C Hamanoba4b9282008-07-06 05:20:31947<div class="para"><p>Remove directories from the SVN tree if there are no files left
Junio C Hamano9ae1a062006-07-10 08:12:34948behind. SVN can version empty directories, and they are not
949removed by default if there are no files left in them. git
950cannot version empty directories. Enabling this flag will make
Junio C Hamanoba4b9282008-07-06 05:20:31951the commit to SVN act like git.</p></div>
952<div class="para"><p>config key: svn.rmdir</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34953</dd>
954<dt>
955-e
956</dt>
957<dt>
958--edit
959</dt>
960<dd>
961<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57962Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:34963</p>
Junio C Hamanoba4b9282008-07-06 05:20:31964<div class="para"><p>Edit the commit message before committing to SVN. This is off by
Junio C Hamano9ae1a062006-07-10 08:12:34965default for objects that are commits, and forced on when committing
Junio C Hamanoba4b9282008-07-06 05:20:31966tree objects.</p></div>
967<div class="para"><p>config key: svn.edit</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34968</dd>
969<dt>
970-l&lt;num&gt;
971</dt>
972<dt>
973--find-copies-harder
974</dt>
975<dd>
976<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57977Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:34978</p>
Junio C Hamanoba4b9282008-07-06 05:20:31979<div class="para"><p>They are both passed directly to <em>git-diff-tree</em>; see
980<a href="git-diff-tree.html">git-diff-tree(1)</a> for more information.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:31981<div class="verseblock">
Junio C Hamano7ad22dc2007-01-29 02:55:48982<div class="content">config key: svn.l
983config key: svn.findcopiesharder</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:34984</dd>
985<dt>
986-A&lt;filename&gt;
987</dt>
988<dt>
989--authors-file=&lt;filename&gt;
990</dt>
991<dd>
992<p>
Junio C Hamano7f80ae82008-07-30 18:31:35993Syntax is compatible with the file used by <em>git-cvsimport</em>:
Junio C Hamano9ae1a062006-07-10 08:12:34994</p>
Junio C Hamano9ae1a062006-07-10 08:12:34995<div class="listingblock">
996<div class="content">
Junio C Hamano6b2cee12006-08-26 08:43:31997<pre><tt> loginname = Joe User &lt;user@example.com&gt;</tt></pre>
Junio C Hamano9ae1a062006-07-10 08:12:34998</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31999<div class="para"><p>If this option is specified and <em>git-svn</em> encounters an SVN
1000committer name that does not exist in the authors-file, <em>git-svn</em>
Junio C Hamano9ae1a062006-07-10 08:12:341001will abort operation. The user will then have to add the
Junio C Hamanoba4b9282008-07-06 05:20:311002appropriate entry. Re-running the previous <em>git-svn</em> command
1003after the authors-file is modified should continue operation.</p></div>
1004<div class="para"><p>config key: svn.authorsfile</p></div>
Junio C Hamano43d01342006-10-12 04:07:321005</dd>
1006<dt>
Junio C Hamano52d5def2009-05-21 16:27:431007--authors-prog=&lt;filename&gt;
1008</dt>
1009<dd>
1010<p>
1011If this option is specified, for each SVN committer name that does not
1012exist in the authors file, the given file is executed with the committer
1013name as the first argument. The program is expected to return a single
1014line of the form "Name &lt;email&gt;", which will be treated as if included in
1015the authors file.
1016</p>
1017</dd>
1018<dt>
Junio C Hamano43d01342006-10-12 04:07:321019-q
1020</dt>
1021<dt>
1022--quiet
1023</dt>
1024<dd>
1025<p>
Junio C Hamano9572e922009-04-02 06:52:031026 Make <em>git-svn</em> less verbose. Specify a second time to make it
1027 even less verbose.
Junio C Hamano43d01342006-10-12 04:07:321028</p>
1029</dd>
1030<dt>
1031--repack[=&lt;n&gt;]
1032</dt>
Junio C Hamanoa3fd83c2007-03-02 10:34:361033<dt>
1034--repack-flags=&lt;flags&gt;
1035</dt>
Junio C Hamano43d01342006-10-12 04:07:321036<dd>
1037<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361038These should help keep disk usage sane for large fetches
1039with many revisions.
Junio C Hamano43d01342006-10-12 04:07:321040</p>
Junio C Hamanoba4b9282008-07-06 05:20:311041<div class="para"><p>--repack takes an optional argument for the number of revisions
Junio C Hamano43d01342006-10-12 04:07:321042to fetch before repacking. This defaults to repacking every
Junio C Hamanoba4b9282008-07-06 05:20:3110431000 commits fetched if no argument is specified.</p></div>
1044<div class="para"><p>--repack-flags are passed directly to <em>git-repack</em>.</p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361045<div class="verseblock">
1046<div class="content">config key: svn.repack
1047config key: svn.repackflags</div></div>
Junio C Hamano6b2cee12006-08-26 08:43:311048</dd>
1049<dt>
1050-m
1051</dt>
1052<dt>
1053--merge
1054</dt>
1055<dt>
1056-s&lt;strategy&gt;
1057</dt>
1058<dt>
1059--strategy=&lt;strategy&gt;
1060</dt>
1061<dd>
1062<p>
Junio C Hamano00cb3712007-02-23 11:13:521063These are only used with the <em>dcommit</em> and <em>rebase</em> commands.
Junio C Hamano6b2cee12006-08-26 08:43:311064</p>
Junio C Hamanoba4b9282008-07-06 05:20:311065<div class="para"><p>Passed directly to <em>git-rebase</em> when using <em>dcommit</em> if a
1066<em>git-reset</em> cannot be used (see <em>dcommit</em>).</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311067</dd>
1068<dt>
1069-n
1070</dt>
1071<dt>
1072--dry-run
1073</dt>
1074<dd>
1075<p>
Junio C Hamanoa476efa2008-10-10 15:31:421076This can be used with the <em>dcommit</em>, <em>rebase</em>, <em>branch</em> and <em>tag</em>
1077commands.
Junio C Hamano6b2cee12006-08-26 08:43:311078</p>
Junio C Hamanoba4b9282008-07-06 05:20:311079<div class="para"><p>For <em>dcommit</em>, print out the series of git arguments that would show
1080which diffs would be committed to SVN.</p></div>
1081<div class="para"><p>For <em>rebase</em>, display the local branch associated with the upstream svn
Junio C Hamano9e1793f2008-06-02 07:31:161082repository associated with the current branch and the URL of svn
Junio C Hamanoba4b9282008-07-06 05:20:311083repository that will be fetched from.</p></div>
Junio C Hamanoa476efa2008-10-10 15:31:421084<div class="para"><p>For <em>branch</em> and <em>tag</em>, display the urls that will be used for copying when
1085creating the branch or tag.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311086</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311087</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:341088</div>
Junio C Hamanoba4b9282008-07-06 05:20:311089<h2 id="_advanced_options">ADVANCED OPTIONS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341090<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311091<div class="vlist"><dl>
Junio C Hamano9ae1a062006-07-10 08:12:341092<dt>
Junio C Hamano9ae1a062006-07-10 08:12:341093-i&lt;GIT_SVN_ID&gt;
1094</dt>
1095<dt>
1096--id &lt;GIT_SVN_ID&gt;
1097</dt>
1098<dd>
1099<p>
Junio C Hamano00cb3712007-02-23 11:13:521100This sets GIT_SVN_ID (instead of using the environment). This
1101allows the user to override the default refname to fetch from
1102when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands
1103no longer require this switch as an argument.
1104</p>
1105</dd>
1106<dt>
1107-R&lt;remote name&gt;
1108</dt>
1109<dt>
1110--svn-remote &lt;remote name&gt;
1111</dt>
1112<dd>
1113<p>
1114 Specify the [svn-remote "&lt;remote name&gt;"] section to use,
1115 this allows SVN multiple repositories to be tracked.
1116 Default: "svn"
Junio C Hamano9ae1a062006-07-10 08:12:341117</p>
1118</dd>
Junio C Hamano43d01342006-10-12 04:07:321119<dt>
1120--follow-parent
1121</dt>
1122<dd>
1123<p>
1124 This is especially helpful when we're tracking a directory
1125 that has been moved around within the repository, or if we
1126 started tracking a branch and never tracked the trunk it was
Junio C Hamano00cb3712007-02-23 11:13:521127 descended from. This feature is enabled by default, use
1128 --no-follow-parent to disable it.
Junio C Hamano43d01342006-10-12 04:07:321129</p>
Junio C Hamanoba4b9282008-07-06 05:20:311130<div class="para"><p>config key: svn.followparent</p></div>
Junio C Hamano43d01342006-10-12 04:07:321131</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311132</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:521133</div>
Junio C Hamanoba4b9282008-07-06 05:20:311134<h2 id="_config_file_only_options">CONFIG FILE-ONLY OPTIONS</h2>
Junio C Hamano00cb3712007-02-23 11:13:521135<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311136<div class="vlist"><dl>
Junio C Hamano43d01342006-10-12 04:07:321137<dt>
Junio C Hamano00cb3712007-02-23 11:13:521138svn.noMetadata
1139</dt>
1140<dt>
1141svn-remote.&lt;name&gt;.noMetadata
Junio C Hamano43d01342006-10-12 04:07:321142</dt>
1143<dd>
1144<p>
Junio C Hamanofce7c7e2008-07-02 03:06:381145This gets rid of the <em>git-svn-id:</em> lines at the end of every commit.
Junio C Hamano43d01342006-10-12 04:07:321146</p>
Junio C Hamanoba4b9282008-07-06 05:20:311147<div class="para"><p>If you lose your .git/svn/git-svn/.rev_db file, <em>git-svn</em> will not
Junio C Hamano00cb3712007-02-23 11:13:521148be able to rebuild it and you won't be able to fetch again,
Junio C Hamanoba4b9282008-07-06 05:20:311149either. This is fine for one-shot imports.</p></div>
1150<div class="para"><p>The <em>git-svn log</em> command will not work on repositories using
Junio C Hamanoa3fd83c2007-03-02 10:34:361151this, either. Using this conflicts with the <em>useSvmProps</em>
Junio C Hamanoba4b9282008-07-06 05:20:311152option for (hopefully) obvious reasons.</p></div>
Junio C Hamano43d01342006-10-12 04:07:321153</dd>
Junio C Hamano9ae1a062006-07-10 08:12:341154<dt>
Junio C Hamano00cb3712007-02-23 11:13:521155svn.useSvmProps
1156</dt>
1157<dt>
1158svn-remote.&lt;name&gt;.useSvmProps
Junio C Hamano9ae1a062006-07-10 08:12:341159</dt>
1160<dd>
1161<p>
Junio C Hamanoba4b9282008-07-06 05:20:311162This allows <em>git-svn</em> to re-map repository URLs and UUIDs from
Junio C Hamanoa3fd83c2007-03-02 10:34:361163mirrors created using SVN::Mirror (or svk) for metadata.
Junio C Hamano9ae1a062006-07-10 08:12:341164</p>
Junio C Hamanoba4b9282008-07-06 05:20:311165<div class="para"><p>If an SVN revision has a property, "svm:headrev", it is likely
Junio C Hamano00cb3712007-02-23 11:13:521166that the revision was created by SVN::Mirror (also used by SVK).
1167The property contains a repository UUID and a revision. We want
1168to make it look like we are mirroring the original URL, so
1169introduce a helper function that returns the original identity
1170URL and UUID, and use it when generating metadata in commit
Junio C Hamanoba4b9282008-07-06 05:20:311171messages.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341172</dd>
1173<dt>
Junio C Hamano00cb3712007-02-23 11:13:521174svn.useSvnsyncProps
1175</dt>
1176<dt>
1177svn-remote.&lt;name&gt;.useSvnsyncprops
Junio C Hamano47c1e3c2006-09-25 04:45:551178</dt>
1179<dd>
1180<p>
Junio C Hamano00cb3712007-02-23 11:13:521181 Similar to the useSvmProps option; this is for users
1182 of the svnsync(1) command distributed with SVN 1.4.x and
1183 later.
Junio C Hamano47c1e3c2006-09-25 04:45:551184</p>
Junio C Hamano00cb3712007-02-23 11:13:521185</dd>
1186<dt>
1187svn-remote.&lt;name&gt;.rewriteRoot
1188</dt>
1189<dd>
1190<p>
1191 This allows users to create repositories from alternate
Junio C Hamanoba4b9282008-07-06 05:20:311192 URLs. For example, an administrator could run <em>git-svn</em> on the
Junio C Hamano00cb3712007-02-23 11:13:521193 server locally (accessing via file://) but wish to distribute
1194 the repository with a public http:// or svn:// URL in the
1195 metadata so users of it will see the public URL.
1196</p>
Junio C Hamano0538b892008-06-20 04:18:331197</dd>
Junio C Hamanob3250062009-02-11 20:16:501198<dt>
1199svn.brokenSymlinkWorkaround
1200</dt>
1201<dd>
1202<p>
1203This disables potentially expensive checks to workaround broken symlinks
1204checked into SVN by broken clients. Set this option to "false" if you
1205track a SVN repository with many empty blobs that are not symlinks.
1206This option may be changed while "git-svn" is running and take effect on
1207the next revision fetched. If unset, git-svn assumes this option to be
1208"true".
1209</p>
1210</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311211</dl></div>
1212<div class="para"><p>Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
1213options all affect the metadata generated and used by <em>git-svn</em>; they
Junio C Hamano00cb3712007-02-23 11:13:521214<strong>must</strong> be set in the configuration file before any history is imported
Junio C Hamanoba4b9282008-07-06 05:20:311215and these settings should never be changed once they are set.</p></div>
1216<div class="para"><p>Additionally, only one of these four options can be used per-svn-remote
1217section because they affect the <em>git-svn-id:</em> metadata line.</p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361218</div>
Junio C Hamanoba4b9282008-07-06 05:20:311219<h2 id="_basic_examples">BASIC EXAMPLES</h2>
Junio C Hamanoa3fd83c2007-03-02 10:34:361220<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311221<div class="para"><p>Tracking and contributing to the trunk of a Subversion-managed project:</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341222<div class="listingblock">
1223<div class="content">
Junio C Hamano00cb3712007-02-23 11:13:521224<pre><tt># Clone a repo (like git clone):
Junio C Hamanoa476efa2008-10-10 15:31:421225 git svn clone http://svn.example.com/project/trunk
Junio C Hamano00cb3712007-02-23 11:13:521226# Enter the newly cloned directory:
1227 cd trunk
1228# You should be on master branch, double-check with git-branch
1229 git branch
1230# Do some work and commit locally to git:
1231 git commit ...
1232# Something is committed to SVN, rebase your local changes against the
1233# latest changes in SVN:
Junio C Hamanofce7c7e2008-07-02 03:06:381234 git svn rebase
Junio C Hamano00cb3712007-02-23 11:13:521235# Now commit your changes (that were committed previously using git) to SVN,
1236# as well as automatically updating your working HEAD:
Junio C Hamanofce7c7e2008-07-02 03:06:381237 git svn dcommit
Junio C Hamano9ae1a062006-07-10 08:12:341238# Append svn:ignore settings to the default git exclude file:
Junio C Hamanofce7c7e2008-07-02 03:06:381239 git svn show-ignore &gt;&gt; .git/info/exclude</tt></pre>
Junio C Hamano9ae1a062006-07-10 08:12:341240</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:311241<div class="para"><p>Tracking and contributing to an entire Subversion-managed project
1242(complete with a trunk, tags and branches):</p></div>
Junio C Hamanoa8d072a2007-01-05 07:46:251243<div class="listingblock">
1244<div class="content">
Junio C Hamano00cb3712007-02-23 11:13:521245<pre><tt># Clone a repo (like git clone):
Junio C Hamanoa476efa2008-10-10 15:31:421246 git svn clone http://svn.example.com/project -T trunk -b branches -t tags
Junio C Hamano00cb3712007-02-23 11:13:521247# View all branches and tags you have cloned:
1248 git branch -r
Junio C Hamanoa476efa2008-10-10 15:31:421249# Create a new branch in SVN
1250 git svn branch waldo
Junio C Hamano00cb3712007-02-23 11:13:521251# Reset your master to trunk (or any other branch, replacing 'trunk'
1252# with the appropriate name):
1253 git reset --hard remotes/trunk
1254# You may only dcommit to one branch/tag/trunk at a time. The usage
Junio C Hamanoa3fd83c2007-03-02 10:34:361255# of dcommit/rebase/show-ignore should be the same as above.</tt></pre>
Junio C Hamanoa8d072a2007-01-05 07:46:251256</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:311257<div class="para"><p>The initial <em>git-svn clone</em> can be quite time-consuming
Junio C Hamanoe9bfa9b2007-08-07 06:06:111258(especially for large Subversion repositories). If multiple
1259people (or one person with multiple machines) want to use
Junio C Hamanoba4b9282008-07-06 05:20:311260<em>git-svn</em> to interact with the same Subversion repository, you can
1261do the initial <em>git-svn clone</em> to a repository on a server and
1262have each person clone that repository with <em>git-clone</em>:</p></div>
Junio C Hamanoe9bfa9b2007-08-07 06:06:111263<div class="listingblock">
1264<div class="content">
1265<pre><tt># Do the initial import on a server
Junio C Hamanoa476efa2008-10-10 15:31:421266 ssh server "cd /pub &amp;&amp; git svn clone http://svn.example.com/project
Junio C Hamanof7bb6692008-01-27 08:23:461267# Clone locally - make sure the refs/remotes/ space matches the server
1268 mkdir project
1269 cd project
Junio C Hamanofce7c7e2008-07-02 03:06:381270 git init
Junio C Hamanof7bb6692008-01-27 08:23:461271 git remote add origin server:/pub/project
Junio C Hamano9e7b3f32008-06-29 08:49:031272 git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
Junio C Hamanof7bb6692008-01-27 08:23:461273 git fetch
Junio C Hamanod3452a02008-11-15 08:07:551274# Create a local branch from one of the branches just fetched
1275 git checkout -b master FETCH_HEAD
Junio C Hamanoe9bfa9b2007-08-07 06:06:111276# Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
Junio C Hamanoa476efa2008-10-10 15:31:421277 git svn init http://svn.example.com/project
Junio C Hamanoe9bfa9b2007-08-07 06:06:111278# Pull the latest changes from Subversion
Junio C Hamanofce7c7e2008-07-02 03:06:381279 git svn rebase</tt></pre>
Junio C Hamanoe9bfa9b2007-08-07 06:06:111280</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341281</div>
Junio C Hamanoba4b9282008-07-06 05:20:311282<h2 id="_rebase_vs_pull_merge">REBASE VS. PULL/MERGE</h2>
Junio C Hamano6b2cee12006-08-26 08:43:311283<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311284<div class="para"><p>Originally, <em>git-svn</em> recommended that the <em>remotes/git-svn</em> branch be
Junio C Hamano79770b62007-01-07 07:43:581285pulled or merged from. This is because the author favored
Junio C Hamanofce7c7e2008-07-02 03:06:381286<tt>git svn set-tree B</tt> to commit a single head rather than the
Junio C Hamanoba4b9282008-07-06 05:20:311287<tt>git svn set-tree A..B</tt> notation to commit multiple commits.</p></div>
1288<div class="para"><p>If you use <tt>git svn set-tree A..B</tt> to commit several diffs and you do
Junio C Hamano79770b62007-01-07 07:43:581289not have the latest remotes/git-svn merged into my-branch, you should
Junio C Hamanofce7c7e2008-07-02 03:06:381290use <tt>git svn rebase</tt> to update your work branch instead of <tt>git pull</tt> or
Junio C Hamano0e88f3e2009-06-21 08:03:251291<tt>git merge</tt>. <tt>pull</tt>/<tt>merge</tt> can cause non-linear history to be flattened
Junio C Hamano79770b62007-01-07 07:43:581292when committing into SVN, which can lead to merge commits reversing
Junio C Hamanoba4b9282008-07-06 05:20:311293previous commits in SVN.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311294</div>
Junio C Hamanoba4b9282008-07-06 05:20:311295<h2 id="_design_philosophy">DESIGN PHILOSOPHY</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341296<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311297<div class="para"><p>Merge tracking in Subversion is lacking and doing branched development
1298with Subversion can be cumbersome as a result. While <em>git-svn</em> can track
Junio C Hamanod2d9ae12007-09-19 02:27:571299copy history (including branches and tags) for repositories adopting a
1300standard layout, it cannot yet represent merge history that happened
1301inside git back upstream to SVN users. Therefore it is advised that
1302users keep history as linear as possible inside git to ease
Junio C Hamanoba4b9282008-07-06 05:20:311303compatibility with SVN (see the CAVEATS section below).</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341304</div>
Junio C Hamanoba4b9282008-07-06 05:20:311305<h2 id="_caveats">CAVEATS</h2>
Junio C Hamanobdebabb2007-08-23 00:25:091306<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311307<div class="para"><p>For the sake of simplicity and interoperating with a less-capable system
1308(SVN), it is recommended that all <em>git-svn</em> users clone, fetch and dcommit
1309directly from the SVN server, and avoid all <em>git-clone</em>/<em>pull</em>/<em>merge</em>/<em>push</em>
Junio C Hamanobdebabb2007-08-23 00:25:091310operations between git repositories and branches. The recommended
1311method of exchanging code between git branches and users is
Junio C Hamanoba4b9282008-07-06 05:20:311312<em>git-format-patch</em> and <em>git-am</em>, or just 'dcommit'ing to the SVN repository.</p></div>
1313<div class="para"><p>Running <em>git-merge</em> or <em>git-pull</em> is NOT recommended on a branch you
Junio C Hamanofce7c7e2008-07-02 03:06:381314plan to <em>dcommit</em> from. Subversion does not represent merges in any
Junio C Hamanobdebabb2007-08-23 00:25:091315reasonable or useful fashion; so users using Subversion cannot see any
1316merges you've made. Furthermore, if you merge or pull from a git branch
Junio C Hamanofce7c7e2008-07-02 03:06:381317that is a mirror of an SVN branch, <em>dcommit</em> may commit to the wrong
Junio C Hamanoba4b9282008-07-06 05:20:311318branch.</p></div>
1319<div class="para"><p><em>git-clone</em> does not clone branches under the refs/remotes/ hierarchy or
1320any <em>git-svn</em> metadata, or config. So repositories created and managed with
1321using <em>git-svn</em> should use <em>rsync</em> for cloning, if cloning is to be done
1322at all.</p></div>
1323<div class="para"><p>Since <em>dcommit</em> uses rebase internally, any git branches you <em>git-push</em> to
Junio C Hamanofce7c7e2008-07-02 03:06:381324before <em>dcommit</em> on will require forcing an overwrite of the existing ref
Junio C Hamanobdebabb2007-08-23 00:25:091325on the remote repository. This is generally considered bad practice,
Junio C Hamanoba4b9282008-07-06 05:20:311326see the <a href="git-push.html">git-push(1)</a> documentation for details.</p></div>
1327<div class="para"><p>Do not use the --amend option of <a href="git-commit.html">git-commit(1)</a> on a change you've
Junio C Hamanobdebabb2007-08-23 00:25:091328already dcommitted. It is considered bad practice to --amend commits
1329you've already pushed to a remote repository for other users, and
Junio C Hamanoba4b9282008-07-06 05:20:311330dcommit with SVN is analogous to that.</p></div>
Junio C Hamanobdebabb2007-08-23 00:25:091331</div>
Junio C Hamanoba4b9282008-07-06 05:20:311332<h2 id="_bugs">BUGS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341333<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311334<div class="para"><p>We ignore all SVN properties except svn:executable. Any unhandled
1335properties are logged to $GIT_DIR/svn/&lt;refname&gt;/unhandled.log</p></div>
1336<div class="para"><p>Renamed and copied directories are not detected by git and hence not
Junio C Hamano9ae1a062006-07-10 08:12:341337tracked when committing to SVN. I do not plan on adding support for
1338this as it's quite difficult and time-consuming to get working for all
Junio C Hamano00cb3712007-02-23 11:13:521339the possible corner cases (git doesn't do it, either). Committing
1340renamed and copied files are fully supported if they're similar enough
Junio C Hamanoba4b9282008-07-06 05:20:311341for git to detect them.</p></div>
Junio C Hamano00cb3712007-02-23 11:13:521342</div>
Junio C Hamanoba4b9282008-07-06 05:20:311343<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamano00cb3712007-02-23 11:13:521344<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311345<div class="para"><p><em>git-svn</em> stores [svn-remote] configuration information in the
Junio C Hamano00cb3712007-02-23 11:13:521346repository .git/config file. It is similar the core git
1347[remote] sections except <em>fetch</em> keys do not accept glob
1348arguments; but they are instead handled by the <em>branches</em>
1349and <em>tags</em> keys. Since some SVN repositories are oddly
1350configured with multiple projects glob expansions such those
Junio C Hamanoba4b9282008-07-06 05:20:311351listed below are allowed:</p></div>
Junio C Hamano00cb3712007-02-23 11:13:521352<div class="listingblock">
1353<div class="content">
1354<pre><tt>[svn-remote "project-a"]
1355 url = http://server.org/svn
Junio C Hamano9572e922009-04-02 06:52:031356 fetch = trunk/project-a:refs/remotes/project-a/trunk
Junio C Hamano00cb3712007-02-23 11:13:521357 branches = branches/*/project-a:refs/remotes/project-a/branches/*
Junio C Hamano9572e922009-04-02 06:52:031358 tags = tags/*/project-a:refs/remotes/project-a/tags/*</tt></pre>
Junio C Hamano00cb3712007-02-23 11:13:521359</div></div>
Junio C Hamano07738342009-04-23 03:06:561360<div class="para"><p>Keep in mind that the <em>*</em> (asterisk) wildcard of the local ref
1361(right of the <em>:</em>) *must* be the farthest right path component;
1362however the remote wildcard may be anywhere as long as it's an
Junio C Hamanoa6387422007-08-25 03:54:271363independent path component (surrounded by <em>/</em> or EOL). This
Junio C Hamano00cb3712007-02-23 11:13:521364type of configuration is not automatically created by <em>init</em> and
Junio C Hamanoba4b9282008-07-06 05:20:311365should be manually entered with a text-editor or using <em>git-config</em>.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341366</div>
Junio C Hamanoba4b9282008-07-06 05:20:311367<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano6b2cee12006-08-26 08:43:311368<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311369<div class="para"><p><a href="git-rebase.html">git-rebase(1)</a></p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311370</div>
Junio C Hamanoba4b9282008-07-06 05:20:311371<h2 id="_author">Author</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341372<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311373<div class="para"><p>Written by Eric Wong &lt;normalperson@yhbt.net&gt;.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341374</div>
Junio C Hamanoba4b9282008-07-06 05:20:311375<h2 id="_documentation">Documentation</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341376<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:311377<div class="para"><p>Written by Eric Wong &lt;normalperson@yhbt.net&gt;.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341378</div>
1379<div id="footer">
1380<div id="footer-text">
Junio C Hamano0e88f3e2009-06-21 08:03:251381Last updated 2009-06-21 08:03:02 UTC
Junio C Hamano9ae1a062006-07-10 08:12:341382</div>
1383</div>
1384</body>
1385</html>