blob: 7dc20e8c62e9a1210d987421ef6acdf856f5cbdd [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" />
6<meta name="generator" content="AsciiDoc 7.0.2" />
7<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
19a { color: blue; }
20a:visited { color: fuchsia; }
21
22em {
23 font-style: italic;
24}
25
26strong {
27 font-weight: bold;
28}
29
30tt {
31 color: navy;
32}
33
34h1, h2, h3, h4, h5, h6 {
35 color: #527bbd;
36 font-family: sans-serif;
37 margin-top: 1.2em;
38 margin-bottom: 0.5em;
39 line-height: 1.3;
40}
41
42h1 {
43 border-bottom: 2px solid silver;
44}
45h2 {
46 border-bottom: 2px solid silver;
47 padding-top: 0.5em;
48}
49
50div.sectionbody {
51 font-family: serif;
52 margin-left: 0;
53}
54
55hr {
56 border: 1px solid silver;
57}
58
59p {
60 margin-top: 0.5em;
61 margin-bottom: 0.5em;
62}
63
64pre {
65 padding: 0;
66 margin: 0;
67}
68
69span#author {
70 color: #527bbd;
71 font-family: sans-serif;
72 font-weight: bold;
73 font-size: 1.2em;
74}
75span#email {
76}
77span#revision {
78 font-family: sans-serif;
79}
80
81div#footer {
82 font-family: sans-serif;
83 font-size: small;
84 border-top: 2px solid silver;
85 padding-top: 0.5em;
86 margin-top: 4.0em;
87}
88div#footer-text {
89 float: left;
90 padding-bottom: 0.5em;
91}
92div#footer-badges {
93 float: right;
94 padding-bottom: 0.5em;
95}
96
97div#preamble,
98div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
99div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
100div.admonitionblock {
101 margin-right: 10%;
102 margin-top: 1.5em;
103 margin-bottom: 1.5em;
104}
105div.admonitionblock {
106 margin-top: 2.5em;
107 margin-bottom: 2.5em;
108}
109
110div.content { /* Block element content. */
111 padding: 0;
112}
113
114/* Block element titles. */
115div.title, caption.title {
116 font-family: sans-serif;
117 font-weight: bold;
118 text-align: left;
119 margin-top: 1.0em;
120 margin-bottom: 0.5em;
121}
122div.title + * {
123 margin-top: 0;
124}
125
126td div.title:first-child {
127 margin-top: 0.0em;
128}
129div.content div.title:first-child {
130 margin-top: 0.0em;
131}
132div.content + div.title {
133 margin-top: 0.0em;
134}
135
136div.sidebarblock > div.content {
137 background: #ffffee;
138 border: 1px solid silver;
139 padding: 0.5em;
140}
141
142div.listingblock > div.content {
143 border: 1px solid silver;
144 background: #f4f4f4;
145 padding: 0.5em;
146}
147
148div.quoteblock > div.content {
149 padding-left: 2.0em;
150}
151div.quoteblock .attribution {
152 text-align: right;
153}
154
155div.admonitionblock .icon {
156 vertical-align: top;
157 font-size: 1.1em;
158 font-weight: bold;
159 text-decoration: underline;
160 color: #527bbd;
161 padding-right: 0.5em;
162}
163div.admonitionblock td.content {
164 padding-left: 0.5em;
165 border-left: 2px solid silver;
166}
167
168div.exampleblock > div.content {
169 border-left: 2px solid silver;
170 padding: 0.5em;
171}
172
173div.verseblock div.content {
174 white-space: pre;
175}
176
177div.imageblock div.content { padding-left: 0; }
178div.imageblock img { border: 1px solid silver; }
179span.image img { border-style: none; }
180
181dl {
182 margin-top: 0.8em;
183 margin-bottom: 0.8em;
184}
185dt {
186 margin-top: 0.5em;
187 margin-bottom: 0;
188 font-style: italic;
189}
190dd > *:first-child {
191 margin-top: 0;
192}
193
194ul, ol {
195 list-style-position: outside;
196}
197ol.olist2 {
198 list-style-type: lower-alpha;
199}
200
201div.tableblock > table {
202 border-color: #527bbd;
203 border-width: 3px;
204}
205thead {
206 font-family: sans-serif;
207 font-weight: bold;
208}
209tfoot {
210 font-weight: bold;
211}
212
213div.hlist {
214 margin-top: 0.8em;
215 margin-bottom: 0.8em;
216}
217td.hlist1 {
218 vertical-align: top;
219 font-style: italic;
220 padding-right: 0.8em;
221}
222td.hlist2 {
223 vertical-align: top;
224}
225
226@media print {
227 div#footer-badges { display: none; }
228}
229include::./stylesheets/xhtml11-manpage.css[]
230/* Workarounds for IE6's broken and incomplete CSS2. */
231
232div.sidebar-content {
233 background: #ffffee;
234 border: 1px solid silver;
235 padding: 0.5em;
236}
237div.sidebar-title, div.image-title {
238 font-family: sans-serif;
239 font-weight: bold;
240 margin-top: 0.0em;
241 margin-bottom: 0.5em;
242}
243
244div.listingblock div.content {
245 border: 1px solid silver;
246 background: #f4f4f4;
247 padding: 0.5em;
248}
249
250div.quoteblock-content {
251 padding-left: 2.0em;
252}
253
254div.exampleblock-content {
255 border-left: 2px solid silver;
256 padding-left: 0.5em;
257}
258</style>
259<title>git-svn(1)</title>
260</head>
261<body>
262<div id="header">
263<h1>
264git-svn(1) Manual Page
265</h1>
266<h2>NAME</h2>
267<div class="sectionbody">
268<p>git-svn -
Junio C Hamano7c73c662007-01-19 00:37:50269 Bidirectional operation between a single Subversion branch and git
Junio C Hamano9ae1a062006-07-10 08:12:34270</p>
271</div>
272</div>
273<h2>SYNOPSIS</h2>
274<div class="sectionbody">
275<p><em>git-svn</em> &lt;command&gt; [options] [arguments]</p>
276</div>
277<h2>DESCRIPTION</h2>
278<div class="sectionbody">
Junio C Hamanoa8d072a2007-01-05 07:46:25279<p>git-svn is a simple conduit for changesets between Subversion and git.
280It is not to be confused with <a href="git-svnimport.html">git-svnimport(1)</a>, which is
Junio C Hamano00cb3712007-02-23 11:13:52281read-only.</p>
Junio C Hamanoa8d072a2007-01-05 07:46:25282<p>git-svn was originally designed for an individual developer who wants a
Junio C Hamano9ae1a062006-07-10 08:12:34283bidirectional flow of changesets between a single branch in Subversion
Junio C Hamanoa8d072a2007-01-05 07:46:25284and an arbitrary number of branches in git. Since its inception,
285git-svn has gained the ability to track multiple branches in a manner
Junio C Hamano00cb3712007-02-23 11:13:52286similar to git-svnimport.</p>
Junio C Hamanoa8d072a2007-01-05 07:46:25287<p>git-svn is especially useful when it comes to tracking repositories
288not organized in the way Subversion developers recommend (trunk,
289branches, tags directories).</p>
Junio C Hamano9ae1a062006-07-10 08:12:34290</div>
291<h2>COMMANDS</h2>
292<div class="sectionbody">
293<dl>
294<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31295<em>init</em>
Junio C Hamano9ae1a062006-07-10 08:12:34296</dt>
297<dd>
298<p>
Junio C Hamano00cb3712007-02-23 11:13:52299 Initializes an empty git repository with additional
300 metadata directories for git-svn. The Subversion URL
301 may be specified as a command-line argument, or as full
302 URL arguments to -T/-t/-b. Optionally, the target
303 directory to operate on can be specified as a second
304 argument. Normally this command initializes the current
305 directory.
Junio C Hamano9ae1a062006-07-10 08:12:34306</p>
307</dd>
308<dt>
Junio C Hamano00cb3712007-02-23 11:13:52309-T&lt;trunk_subdir&gt;
310</dt>
311<dt>
312--trunk=&lt;trunk_subdir&gt;
313</dt>
314<dt>
315-t&lt;tags_subdir&gt;
316</dt>
317<dt>
318--tags=&lt;tags_subdir&gt;
319</dt>
320<dt>
321-b&lt;branches_subdir&gt;
322</dt>
323<dt>
324--branches=&lt;branches_subdir&gt;
325</dt>
326<dd>
327<p>
328 These are optional command-line options for init. Each of
329 these flags can point to a relative repository path
330 (--tags=project/tags') or a full url
331 (--tags=https://foo.org/project/tags)
332</p>
333</dd>
334<dt>
335--no-metadata
336</dt>
337<dd>
338<p>
339 Set the <em>noMetadata</em> option in the [svn-remote] config.
340</p>
341</dd>
342<dt>
343--use-svm-props
344</dt>
345<dd>
346<p>
347 Set the <em>useSvmProps</em> option in the [svn-remote] config.
348</p>
349</dd>
350<dt>
351--use-svnsync-props
352</dt>
353<dd>
354<p>
355 Set the <em>useSvnsyncProps</em> option in the [svn-remote] config.
356</p>
357</dd>
358<dt>
359--rewrite-root=&lt;URL&gt;
360</dt>
361<dd>
362<p>
363 Set the <em>rewriteRoot</em> option in the [svn-remote] config.
364</p>
365</dd>
366<dt>
367--username=&lt;USER&gt;
368</dt>
369<dd>
370<p>
371 For transports that SVN handles authentication for (http,
372 https, and plain svn), specify the username. For other
373 transports (eg svn+ssh://), you must include the username in
374 the URL, eg svn+ssh://foo@svn.bar.com/project
375</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36376</dd>
377<dt>
378--prefix=&lt;prefix&gt;
379</dt>
380<dd>
381<p>
Junio C Hamano00cb3712007-02-23 11:13:52382 This allows one to specify a prefix which is prepended
383 to the names of remotes if trunk/branches/tags are
384 specified. The prefix does not automatically include a
385 trailing slash, so be sure you include one in the
386 argument if that is what you want. This is useful if
387 you wish to track multiple projects that share a common
Junio C Hamanoa3fd83c2007-03-02 10:34:36388 repository.
389</p>
Junio C Hamano00cb3712007-02-23 11:13:52390</dd>
391<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31392<em>fetch</em>
Junio C Hamano9ae1a062006-07-10 08:12:34393</dt>
394<dd>
395<p>
Junio C Hamano00cb3712007-02-23 11:13:52396 Fetch unfetched revisions from the Subversion remote we are
397 tracking. The name of the [svn-remote "&#8230;"] section in the
398 .git/config file may be specified as an optional command-line
399 argument.
Junio C Hamano9ae1a062006-07-10 08:12:34400</p>
Junio C Hamano00cb3712007-02-23 11:13:52401</dd>
402<dt>
403<em>clone</em>
404</dt>
405<dd>
406<p>
407 Runs <em>init</em> and <em>fetch</em>. It will automatically create a
408 directory based on the basename of the URL passed to it;
409 or if a second argument is passed; it will create a directory
410 and work within that. It accepts all arguments that the
411 <em>init</em> and <em>fetch</em> commands accept; with the exception of
412 <em>--fetch-all</em>. After a repository is cloned, the <em>fetch</em>
413 command will be able to update revisions without affecting
414 the working tree; and the <em>rebase</em> command will be able
415 to update the working tree with the latest changes.
416</p>
417</dd>
418<dt>
419<em>rebase</em>
420</dt>
421<dd>
422<p>
423 This fetches revisions from the SVN parent of the current HEAD
424 and rebases the current (uncommitted to SVN) work against it.
425</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36426<p>This works similarly to <em>svn update</em> or <em>git-pull</em> except that
427it preserves linear history with <em>git-rebase</em> instead of
428<em>git-merge</em> for ease of dcommit-ing with git-svn.</p>
429<p>This accepts all options that <em>git-svn fetch</em> and <em>git-rebase</em>
430accepts. However <em>--fetch-all</em> only fetches from the current
431[svn-remote], and not all [svn-remote] definitions.</p>
432<p>Like <em>git-rebase</em>; this requires that the working tree be clean
433and have no uncommitted changes.</p>
Junio C Hamano103ad7f2007-03-14 11:19:26434<p>+</p>
Junio C Hamano9ae1a062006-07-10 08:12:34435</dd>
Junio C Hamano103ad7f2007-03-14 11:19:26436</dl>
437<dl>
438<dt>
439-l
440</dt>
441<dt>
442--local
443</dt>
444<dd>
445<p>
446 Do not fetch remotely; only run <em>git-rebase</em> against the
447 last fetched commit from the upstream SVN.
448</p>
449</dd>
450</dl>
451<p>+</p>
452<dl>
Junio C Hamano9ae1a062006-07-10 08:12:34453<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31454<em>dcommit</em>
455</dt>
456<dd>
457<p>
Junio C Hamano79770b62007-01-07 07:43:58458 Commit each diff from a specified head directly to the SVN
Junio C Hamano6b2cee12006-08-26 08:43:31459 repository, and then rebase or reset (depending on whether or
Junio C Hamano79770b62007-01-07 07:43:58460 not there is a diff between SVN and head). This will create
461 a revision in SVN for each commit in git.
462 It is recommended that you run git-svn fetch and rebase (not
463 pull or merge) your commits against the latest changes in the
464 SVN repository.
Junio C Hamano511162f2006-12-13 06:35:48465 An optional command-line argument may be specified as an
466 alternative to HEAD.
Junio C Hamano4bf6dca2006-12-21 02:25:57467 This is advantageous over <em>set-tree</em> (below) because it produces
Junio C Hamano6b2cee12006-08-26 08:43:31468 cleaner, more linear history.
469</p>
470</dd>
Junio C Hamanoa3fd83c2007-03-02 10:34:36471</dl>
472<dl>
Junio C Hamano6b2cee12006-08-26 08:43:31473<dt>
Junio C Hamano43d01342006-10-12 04:07:32474<em>log</em>
475</dt>
476<dd>
477<p>
478 This should make it easy to look up svn log messages when svn
479 users refer to -r/--revision numbers.
480</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36481<p>The following features from `svn log' are supported:</p>
482<dl>
483<dt>
484--revision=&lt;n&gt;[:&lt;n&gt;]
485</dt>
486<dd>
487<p>
488 is supported, non-numeric args are not:
489 HEAD, NEXT, BASE, PREV, etc &#8230;
490</p>
Junio C Hamano43d01342006-10-12 04:07:32491</dd>
492<dt>
Junio C Hamanoa3fd83c2007-03-02 10:34:36493-v/--verbose
494</dt>
495<dd>
496<p>
497 it's not completely compatible with the --verbose
498 output in svn log, but reasonably close.
499</p>
500</dd>
501<dt>
502--limit=&lt;n&gt;
503</dt>
504<dd>
505<p>
506 is NOT the same as --max-count, doesn't count
507 merged/excluded commits
508</p>
509</dd>
510<dt>
511--incremental
512</dt>
513<dd>
514<p>
515 supported
516</p>
517</dd>
518</dl>
519<p>New features:</p>
520<dl>
521<dt>
522--show-commit
523</dt>
524<dd>
525<p>
526 shows the git commit sha1, as well
527</p>
528</dd>
529<dt>
530--oneline
531</dt>
532<dd>
533<p>
534 our version of --pretty=oneline
535</p>
536</dd>
537</dl>
538<p>Any other arguments are passed directly to `git log'</p>
539</dd>
540</dl>
541<dl>
542<dt>
Junio C Hamano469d60e2007-04-29 18:30:34543<em>find-rev</em>
544</dt>
545<dd>
546<p>
547 When given an SVN revision number of the form <em>rN</em>, returns the
548 corresponding git commit hash. When given a tree-ish, returns the
549 corresponding SVN revision number.
550</p>
551</dd>
552<dt>
Junio C Hamano4bf6dca2006-12-21 02:25:57553<em>set-tree</em>
Junio C Hamano9ae1a062006-07-10 08:12:34554</dt>
555<dd>
556<p>
Junio C Hamano43d01342006-10-12 04:07:32557 You should consider using <em>dcommit</em> instead of this command.
Junio C Hamano9ae1a062006-07-10 08:12:34558 Commit specified commit or tree objects to SVN. This relies on
559 your imported fetch data being up-to-date. This makes
560 absolutely no attempts to do patching when committing to SVN, it
561 simply overwrites files with those specified in the tree or
562 commit. All merging is assumed to have taken place
563 independently of git-svn functions.
564</p>
565</dd>
566<dt>
Junio C Hamano6b2cee12006-08-26 08:43:31567<em>show-ignore</em>
Junio C Hamano9ae1a062006-07-10 08:12:34568</dt>
569<dd>
570<p>
571 Recursively finds and lists the svn:ignore property on
572 directories. The output is suitable for appending to
573 the $GIT_DIR/info/exclude file.
574</p>
575</dd>
Junio C Hamano43d01342006-10-12 04:07:32576<dt>
577<em>commit-diff</em>
578</dt>
579<dd>
580<p>
581 Commits the diff of two tree-ish arguments from the
Junio C Hamanof9771f62007-01-17 17:42:30582 command-line. This command is intended for interoperability with
Junio C Hamano43d01342006-10-12 04:07:32583 git-svnimport and does not rely on being inside an git-svn
584 init-ed repository. This command takes three arguments, (a) the
585 original tree to diff against, (b) the new tree result, (c) the
586 URL of the target Subversion repository. The final argument
587 (URL) may be omitted if you are working from a git-svn-aware
588 repository (that has been init-ed with git-svn).
Junio C Hamano23db8852006-11-09 23:35:53589 The -r&lt;revision&gt; option is required for this.
Junio C Hamano43d01342006-10-12 04:07:32590</p>
591</dd>
Junio C Hamano9ae1a062006-07-10 08:12:34592</dl>
593</div>
594<h2>OPTIONS</h2>
595<div class="sectionbody">
596<dl>
597<dt>
Junio C Hamano00cb3712007-02-23 11:13:52598--shared[={false|true|umask|group|all|world|everybody}]
Junio C Hamano43d01342006-10-12 04:07:32599</dt>
600<dt>
601--template=&lt;template_directory&gt;
602</dt>
603<dd>
604<p>
605 Only used with the <em>init</em> command.
Junio C Hamano24351a82007-01-13 08:09:17606 These are passed directly to <a href="git-init.html">git-init(1)</a>.
Junio C Hamano43d01342006-10-12 04:07:32607</p>
608</dd>
609<dt>
Junio C Hamano9ae1a062006-07-10 08:12:34610-r &lt;ARG&gt;
611</dt>
612<dt>
613--revision &lt;ARG&gt;
614</dt>
615<dd>
616<p>
Junio C Hamano00cb3712007-02-23 11:13:52617Used with the <em>fetch</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:34618</p>
Junio C Hamano00cb3712007-02-23 11:13:52619<p>This allows revision ranges for partial/cauterized history
620to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges),
621$NUMBER:HEAD, and BASE:$NUMBER are all supported.</p>
622<p>This can allow you to make partial mirrors when running fetch;
623but is generally not recommended because history will be skipped
624and lost.</p>
Junio C Hamano9ae1a062006-07-10 08:12:34625</dd>
626<dt>
627-
628</dt>
629<dt>
630--stdin
631</dt>
632<dd>
633<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57634Only used with the <em>set-tree</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:34635</p>
Junio C Hamano6b2cee12006-08-26 08:43:31636<p>Read a list of commits from stdin and commit them in reverse
Junio C Hamano9ae1a062006-07-10 08:12:34637order. Only the leading sha1 is read from each line, so
Junio C Hamano6b2cee12006-08-26 08:43:31638git-rev-list --pretty=oneline output can be used.</p>
Junio C Hamano9ae1a062006-07-10 08:12:34639</dd>
640<dt>
641--rmdir
642</dt>
643<dd>
644<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57645Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:34646</p>
Junio C Hamano6b2cee12006-08-26 08:43:31647<p>Remove directories from the SVN tree if there are no files left
Junio C Hamano9ae1a062006-07-10 08:12:34648behind. SVN can version empty directories, and they are not
649removed by default if there are no files left in them. git
650cannot version empty directories. Enabling this flag will make
Junio C Hamano6b2cee12006-08-26 08:43:31651the commit to SVN act like git.</p>
Junio C Hamano7ad22dc2007-01-29 02:55:48652<p>config key: svn.rmdir</p>
Junio C Hamano9ae1a062006-07-10 08:12:34653</dd>
654<dt>
655-e
656</dt>
657<dt>
658--edit
659</dt>
660<dd>
661<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57662Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:34663</p>
Junio C Hamano6b2cee12006-08-26 08:43:31664<p>Edit the commit message before committing to SVN. This is off by
Junio C Hamano9ae1a062006-07-10 08:12:34665default for objects that are commits, and forced on when committing
Junio C Hamano6b2cee12006-08-26 08:43:31666tree objects.</p>
Junio C Hamano7ad22dc2007-01-29 02:55:48667<p>config key: svn.edit</p>
Junio C Hamano9ae1a062006-07-10 08:12:34668</dd>
669<dt>
670-l&lt;num&gt;
671</dt>
672<dt>
673--find-copies-harder
674</dt>
675<dd>
676<p>
Junio C Hamano4bf6dca2006-12-21 02:25:57677Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:34678</p>
Junio C Hamano6b2cee12006-08-26 08:43:31679<p>They are both passed directly to git-diff-tree see
680<a href="git-diff-tree.html">git-diff-tree(1)</a> for more information.</p>
681<div class="verseblock">
Junio C Hamano7ad22dc2007-01-29 02:55:48682<div class="content">config key: svn.l
683config key: svn.findcopiesharder</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:34684</dd>
685<dt>
686-A&lt;filename&gt;
687</dt>
688<dt>
689--authors-file=&lt;filename&gt;
690</dt>
691<dd>
692<p>
Junio C Hamano6b2cee12006-08-26 08:43:31693Syntax is compatible with the files used by git-svnimport and
694git-cvsimport:
Junio C Hamano9ae1a062006-07-10 08:12:34695</p>
Junio C Hamano9ae1a062006-07-10 08:12:34696<div class="listingblock">
697<div class="content">
Junio C Hamano6b2cee12006-08-26 08:43:31698<pre><tt> loginname = Joe User &lt;user@example.com&gt;</tt></pre>
Junio C Hamano9ae1a062006-07-10 08:12:34699</div></div>
Junio C Hamano6b2cee12006-08-26 08:43:31700<p>If this option is specified and git-svn encounters an SVN
Junio C Hamano9ae1a062006-07-10 08:12:34701committer name that does not exist in the authors-file, git-svn
702will abort operation. The user will then have to add the
703appropriate entry. Re-running the previous git-svn command
Junio C Hamano6b2cee12006-08-26 08:43:31704after the authors-file is modified should continue operation.</p>
Junio C Hamano7ad22dc2007-01-29 02:55:48705<p>config key: svn.authorsfile</p>
Junio C Hamano43d01342006-10-12 04:07:32706</dd>
707<dt>
708-q
709</dt>
710<dt>
711--quiet
712</dt>
713<dd>
714<p>
Junio C Hamanodeab0362007-01-10 05:05:11715 Make git-svn less verbose.
Junio C Hamano43d01342006-10-12 04:07:32716</p>
717</dd>
718<dt>
719--repack[=&lt;n&gt;]
720</dt>
Junio C Hamanoa3fd83c2007-03-02 10:34:36721<dt>
722--repack-flags=&lt;flags&gt;
723</dt>
Junio C Hamano43d01342006-10-12 04:07:32724<dd>
725<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36726These should help keep disk usage sane for large fetches
727with many revisions.
Junio C Hamano43d01342006-10-12 04:07:32728</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36729<p>--repack takes an optional argument for the number of revisions
Junio C Hamano43d01342006-10-12 04:07:32730to fetch before repacking. This defaults to repacking every
Junio C Hamanoa3fd83c2007-03-02 10:34:367311000 commits fetched if no argument is specified.</p>
732<p>--repack-flags are passed directly to <a href="git-repack.html">git-repack(1)</a>.</p>
733<div class="verseblock">
734<div class="content">config key: svn.repack
735config key: svn.repackflags</div></div>
Junio C Hamano6b2cee12006-08-26 08:43:31736</dd>
737<dt>
738-m
739</dt>
740<dt>
741--merge
742</dt>
743<dt>
744-s&lt;strategy&gt;
745</dt>
746<dt>
747--strategy=&lt;strategy&gt;
748</dt>
749<dd>
750<p>
Junio C Hamano00cb3712007-02-23 11:13:52751These are only used with the <em>dcommit</em> and <em>rebase</em> commands.
Junio C Hamano6b2cee12006-08-26 08:43:31752</p>
753<p>Passed directly to git-rebase when using <em>dcommit</em> if a
754<em>git-reset</em> cannot be used (see dcommit).</p>
755</dd>
756<dt>
757-n
758</dt>
759<dt>
760--dry-run
761</dt>
762<dd>
763<p>
764This is only used with the <em>dcommit</em> command.
765</p>
766<p>Print out the series of git arguments that would show
767which diffs would be committed to SVN.</p>
768</dd>
769</dl>
Junio C Hamano9ae1a062006-07-10 08:12:34770</div>
771<h2>ADVANCED OPTIONS</h2>
772<div class="sectionbody">
773<dl>
774<dt>
Junio C Hamano9ae1a062006-07-10 08:12:34775-i&lt;GIT_SVN_ID&gt;
776</dt>
777<dt>
778--id &lt;GIT_SVN_ID&gt;
779</dt>
780<dd>
781<p>
Junio C Hamano00cb3712007-02-23 11:13:52782This sets GIT_SVN_ID (instead of using the environment). This
783allows the user to override the default refname to fetch from
784when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands
785no longer require this switch as an argument.
786</p>
787</dd>
788<dt>
789-R&lt;remote name&gt;
790</dt>
791<dt>
792--svn-remote &lt;remote name&gt;
793</dt>
794<dd>
795<p>
796 Specify the [svn-remote "&lt;remote name&gt;"] section to use,
797 this allows SVN multiple repositories to be tracked.
798 Default: "svn"
Junio C Hamano9ae1a062006-07-10 08:12:34799</p>
800</dd>
Junio C Hamano43d01342006-10-12 04:07:32801<dt>
802--follow-parent
803</dt>
804<dd>
805<p>
806 This is especially helpful when we're tracking a directory
807 that has been moved around within the repository, or if we
808 started tracking a branch and never tracked the trunk it was
Junio C Hamano00cb3712007-02-23 11:13:52809 descended from. This feature is enabled by default, use
810 --no-follow-parent to disable it.
Junio C Hamano43d01342006-10-12 04:07:32811</p>
Junio C Hamano7ad22dc2007-01-29 02:55:48812<p>config key: svn.followparent</p>
Junio C Hamano43d01342006-10-12 04:07:32813</dd>
Junio C Hamano00cb3712007-02-23 11:13:52814</dl>
815</div>
816<h2>CONFIG FILE-ONLY OPTIONS</h2>
817<div class="sectionbody">
818<dl>
Junio C Hamano43d01342006-10-12 04:07:32819<dt>
Junio C Hamano00cb3712007-02-23 11:13:52820svn.noMetadata
821</dt>
822<dt>
823svn-remote.&lt;name&gt;.noMetadata
Junio C Hamano43d01342006-10-12 04:07:32824</dt>
825<dd>
826<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36827This gets rid of the git-svn-id: lines at the end of every commit.
Junio C Hamano43d01342006-10-12 04:07:32828</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36829<p>If you lose your .git/svn/git-svn/.rev_db file, git-svn will not
Junio C Hamano00cb3712007-02-23 11:13:52830be able to rebuild it and you won't be able to fetch again,
Junio C Hamanoa3fd83c2007-03-02 10:34:36831either. This is fine for one-shot imports.</p>
832<p>The <em>git-svn log</em> command will not work on repositories using
833this, either. Using this conflicts with the <em>useSvmProps</em>
834option for (hopefully) obvious reasons.</p>
Junio C Hamano43d01342006-10-12 04:07:32835</dd>
Junio C Hamano9ae1a062006-07-10 08:12:34836<dt>
Junio C Hamano00cb3712007-02-23 11:13:52837svn.useSvmProps
838</dt>
839<dt>
840svn-remote.&lt;name&gt;.useSvmProps
Junio C Hamano9ae1a062006-07-10 08:12:34841</dt>
842<dd>
843<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36844This allows git-svn to re-map repository URLs and UUIDs from
845mirrors created using SVN::Mirror (or svk) for metadata.
Junio C Hamano9ae1a062006-07-10 08:12:34846</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36847<p>If an SVN revision has a property, "svm:headrev", it is likely
Junio C Hamano00cb3712007-02-23 11:13:52848that the revision was created by SVN::Mirror (also used by SVK).
849The property contains a repository UUID and a revision. We want
850to make it look like we are mirroring the original URL, so
851introduce a helper function that returns the original identity
852URL and UUID, and use it when generating metadata in commit
Junio C Hamanoa3fd83c2007-03-02 10:34:36853messages.</p>
Junio C Hamano9ae1a062006-07-10 08:12:34854</dd>
855<dt>
Junio C Hamano00cb3712007-02-23 11:13:52856svn.useSvnsyncProps
857</dt>
858<dt>
859svn-remote.&lt;name&gt;.useSvnsyncprops
Junio C Hamano47c1e3c2006-09-25 04:45:55860</dt>
861<dd>
862<p>
Junio C Hamano00cb3712007-02-23 11:13:52863 Similar to the useSvmProps option; this is for users
864 of the svnsync(1) command distributed with SVN 1.4.x and
865 later.
Junio C Hamano47c1e3c2006-09-25 04:45:55866</p>
Junio C Hamano00cb3712007-02-23 11:13:52867</dd>
868<dt>
869svn-remote.&lt;name&gt;.rewriteRoot
870</dt>
871<dd>
872<p>
873 This allows users to create repositories from alternate
874 URLs. For example, an administrator could run git-svn on the
875 server locally (accessing via file://) but wish to distribute
876 the repository with a public http:// or svn:// URL in the
877 metadata so users of it will see the public URL.
878</p>
879<p>Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
880options all affect the metadata generated and used by git-svn; they
881<strong>must</strong> be set in the configuration file before any history is imported
882and these settings should never be changed once they are set.</p>
883<p>Additionally, only one of these four options can be used per-svn-remote
884section because they affect the <em>git-svn-id:</em> metadata line.</p>
Junio C Hamano47c1e3c2006-09-25 04:45:55885</dd>
Junio C Hamano9ae1a062006-07-10 08:12:34886</dl>
Junio C Hamanoa3fd83c2007-03-02 10:34:36887</div>
888<h2>BASIC EXAMPLES</h2>
889<div class="sectionbody">
Junio C Hamanoa8d072a2007-01-05 07:46:25890<p>Tracking and contributing to a the trunk of a Subversion-managed project:</p>
Junio C Hamano9ae1a062006-07-10 08:12:34891<div class="listingblock">
892<div class="content">
Junio C Hamano00cb3712007-02-23 11:13:52893<pre><tt># Clone a repo (like git clone):
894 git-svn clone http://svn.foo.org/project/trunk
895# Enter the newly cloned directory:
896 cd trunk
897# You should be on master branch, double-check with git-branch
898 git branch
899# Do some work and commit locally to git:
900 git commit ...
901# Something is committed to SVN, rebase your local changes against the
902# latest changes in SVN:
903 git-svn rebase
904# Now commit your changes (that were committed previously using git) to SVN,
905# as well as automatically updating your working HEAD:
Junio C Hamanoa3e46262006-11-29 07:59:40906 git-svn dcommit
Junio C Hamano9ae1a062006-07-10 08:12:34907# Append svn:ignore settings to the default git exclude file:
908 git-svn show-ignore &gt;&gt; .git/info/exclude</tt></pre>
909</div></div>
Junio C Hamanoa8d072a2007-01-05 07:46:25910<p>Tracking and contributing to an entire Subversion-managed project
Junio C Hamano00cb3712007-02-23 11:13:52911(complete with a trunk, tags and branches):</p>
Junio C Hamanoa8d072a2007-01-05 07:46:25912<div class="listingblock">
913<div class="content">
Junio C Hamano00cb3712007-02-23 11:13:52914<pre><tt># Clone a repo (like git clone):
915 git-svn clone http://svn.foo.org/project -T trunk -b branches -t tags
916# View all branches and tags you have cloned:
917 git branch -r
918# Reset your master to trunk (or any other branch, replacing 'trunk'
919# with the appropriate name):
920 git reset --hard remotes/trunk
921# You may only dcommit to one branch/tag/trunk at a time. The usage
Junio C Hamanoa3fd83c2007-03-02 10:34:36922# of dcommit/rebase/show-ignore should be the same as above.</tt></pre>
Junio C Hamanoa8d072a2007-01-05 07:46:25923</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:34924</div>
Junio C Hamano79770b62007-01-07 07:43:58925<h2>REBASE VS. PULL/MERGE</h2>
Junio C Hamano6b2cee12006-08-26 08:43:31926<div class="sectionbody">
927<p>Originally, git-svn recommended that the remotes/git-svn branch be
Junio C Hamano79770b62007-01-07 07:43:58928pulled or merged from. This is because the author favored
929<em>git-svn set-tree B</em> to commit a single head rather than the
930<em>git-svn set-tree A..B</em> notation to commit multiple commits.</p>
931<p>If you use <em>git-svn set-tree A..B</em> to commit several diffs and you do
932not have the latest remotes/git-svn merged into my-branch, you should
Junio C Hamano00cb3712007-02-23 11:13:52933use <em>git-svn rebase</em> to update your work branch instead of <em>git pull</em> or
Junio C Hamano79770b62007-01-07 07:43:58934<em>git merge</em>. <em>pull/merge</em> can cause non-linear history to be flattened
935when committing into SVN, which can lead to merge commits reversing
936previous commits in SVN.</p>
Junio C Hamano6b2cee12006-08-26 08:43:31937</div>
Junio C Hamano9ae1a062006-07-10 08:12:34938<h2>DESIGN PHILOSOPHY</h2>
939<div class="sectionbody">
940<p>Merge tracking in Subversion is lacking and doing branched development
Junio C Hamanoa3e46262006-11-29 07:59:40941with Subversion is cumbersome as a result. git-svn does not do
942automated merge/branch tracking by default and leaves it entirely up to
Junio C Hamano00cb3712007-02-23 11:13:52943the user on the git side. git-svn does however follow copy
944history of the directory that it is tracking, however (much like
945how <em>svn log</em> works).</p>
Junio C Hamano9ae1a062006-07-10 08:12:34946</div>
947<h2>BUGS</h2>
948<div class="sectionbody">
Junio C Hamano00cb3712007-02-23 11:13:52949<p>We ignore all SVN properties except svn:executable. Any unhandled
950properties are logged to $GIT_DIR/svn/&lt;refname&gt;/unhandled.log</p>
Junio C Hamano9ae1a062006-07-10 08:12:34951<p>Renamed and copied directories are not detected by git and hence not
952tracked when committing to SVN. I do not plan on adding support for
953this as it's quite difficult and time-consuming to get working for all
Junio C Hamano00cb3712007-02-23 11:13:52954the possible corner cases (git doesn't do it, either). Committing
955renamed and copied files are fully supported if they're similar enough
956for git to detect them.</p>
957</div>
958<h2>CONFIGURATION</h2>
959<div class="sectionbody">
960<p>git-svn stores [svn-remote] configuration information in the
961repository .git/config file. It is similar the core git
962[remote] sections except <em>fetch</em> keys do not accept glob
963arguments; but they are instead handled by the <em>branches</em>
964and <em>tags</em> keys. Since some SVN repositories are oddly
965configured with multiple projects glob expansions such those
966listed below are allowed:</p>
967<div class="listingblock">
968<div class="content">
969<pre><tt>[svn-remote "project-a"]
970 url = http://server.org/svn
971 branches = branches/*/project-a:refs/remotes/project-a/branches/*
972 tags = tags/*/project-a:refs/remotes/project-a/tags/*
973 trunk = trunk/project-a:refs/remotes/project-a/trunk</tt></pre>
974</div></div>
975<p>Keep in mind that the <em><strong></em> (asterisk) wildcard of the local ref
976(left of the <em>:</em>) *must</strong> be the farthest right path component;
977however the remote wildcard may be anywhere as long as it's own
978independent path componet (surrounded by <em>/</em> or EOL). This
979type of configuration is not automatically created by <em>init</em> and
980should be manually entered with a text-editor or using
981<a href="git-config.html">git-config(1)</a></p>
Junio C Hamano9ae1a062006-07-10 08:12:34982</div>
Junio C Hamano6b2cee12006-08-26 08:43:31983<h2>SEE ALSO</h2>
984<div class="sectionbody">
985<p><a href="git-rebase.html">git-rebase(1)</a></p>
986</div>
Junio C Hamano9ae1a062006-07-10 08:12:34987<h2>Author</h2>
988<div class="sectionbody">
989<p>Written by Eric Wong &lt;normalperson@yhbt.net&gt;.</p>
990</div>
991<h2>Documentation</h2>
992<div class="sectionbody">
993<p>Written by Eric Wong &lt;normalperson@yhbt.net&gt;.</p>
994</div>
995<div id="footer">
996<div id="footer-text">
Junio C Hamano469d60e2007-04-29 18:30:34997Last updated 29-Apr-2007 18:29:51 UTC
Junio C Hamano9ae1a062006-07-10 08:12:34998</div>
999</div>
1000</body>
1001</html>