blob: dcb0ba83303a9a2c6cf3caa9dab1c8784342f737 [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 Hamano7bd050f2011-09-22 06:32:226<meta name="generator" content="AsciiDoc 8.5.2" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-svn(1)</title>
Junio C Hamano9ae1a062006-07-10 08:12:348<style type="text/css">
9/* Debug borders */
10p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11/*
12 border: 1px solid red;
13*/
14}
15
16body {
17 margin: 1em 5% 1em 5%;
18}
19
Junio C Hamanoba4b9282008-07-06 05:20:3120a {
21 color: blue;
22 text-decoration: underline;
23}
24a:visited {
25 color: fuchsia;
26}
Junio C Hamano9ae1a062006-07-10 08:12:3427
28em {
29 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5930 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:3431}
32
33strong {
34 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5935 color: #083194;
Junio C Hamano9ae1a062006-07-10 08:12:3436}
37
38tt {
39 color: navy;
40}
41
42h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
48}
49
Junio C Hamanoba4b9282008-07-06 05:20:3150h1, h2, h3 {
Junio C Hamano9ae1a062006-07-10 08:12:3451 border-bottom: 2px solid silver;
52}
53h2 {
Junio C Hamano9ae1a062006-07-10 08:12:3454 padding-top: 0.5em;
55}
Junio C Hamanoba4b9282008-07-06 05:20:3156h3 {
57 float: left;
58}
59h3 + * {
60 clear: left;
61}
Junio C Hamano9ae1a062006-07-10 08:12:3462
63div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
66}
67
68hr {
69 border: 1px solid silver;
70}
71
72p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
75}
76
Junio C Hamano68cf15a2010-11-06 01:01:5977ul, ol, li > p {
78 margin-top: 0;
79}
80
Junio C Hamano9ae1a062006-07-10 08:12:3481pre {
82 padding: 0;
83 margin: 0;
84}
85
86span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3190 font-size: 1.1em;
Junio C Hamano9ae1a062006-07-10 08:12:3491}
92span#email {
93}
Junio C Hamano68cf15a2010-11-06 01:01:5994span#revnumber, span#revdate, span#revremark {
Junio C Hamano9ae1a062006-07-10 08:12:3495 font-family: sans-serif;
96}
97
98div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
104}
105div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
108}
109div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
112}
113
Junio C Hamano68cf15a2010-11-06 01:01:59114div#preamble {
115 margin-top: 1.5em;
116 margin-bottom: 1.5em;
117}
Junio C Hamano9ae1a062006-07-10 08:12:34118div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22121 margin-top: 1.0em;
Junio C Hamano9ae1a062006-07-10 08:12:34122 margin-bottom: 1.5em;
123}
124div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22125 margin-top: 2.0em;
126 margin-bottom: 2.0em;
127 margin-right: 10%;
128 color: #606060;
Junio C Hamano9ae1a062006-07-10 08:12:34129}
130
131div.content { /* Block element content. */
132 padding: 0;
133}
134
135/* Block element titles. */
136div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59137 color: #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:34138 font-family: sans-serif;
139 font-weight: bold;
140 text-align: left;
141 margin-top: 1.0em;
142 margin-bottom: 0.5em;
143}
144div.title + * {
145 margin-top: 0;
146}
147
148td div.title:first-child {
149 margin-top: 0.0em;
150}
151div.content div.title:first-child {
152 margin-top: 0.0em;
153}
154div.content + div.title {
155 margin-top: 0.0em;
156}
157
158div.sidebarblock > div.content {
159 background: #ffffee;
160 border: 1px solid silver;
161 padding: 0.5em;
162}
163
164div.listingblock > div.content {
165 border: 1px solid silver;
166 background: #f4f4f4;
167 padding: 0.5em;
168}
169
Junio C Hamano7bd050f2011-09-22 06:32:22170div.quoteblock, div.verseblock {
171 padding-left: 1.0em;
172 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59173 margin-right: 10%;
Junio C Hamano7bd050f2011-09-22 06:32:22174 border-left: 5px solid #dddddd;
175 color: #777777;
Junio C Hamano9ae1a062006-07-10 08:12:34176}
Junio C Hamano7bd050f2011-09-22 06:32:22177
Junio C Hamano68cf15a2010-11-06 01:01:59178div.quoteblock > div.attribution {
179 padding-top: 0.5em;
Junio C Hamano9ae1a062006-07-10 08:12:34180 text-align: right;
181}
Junio C Hamano68cf15a2010-11-06 01:01:59182
Junio C Hamano68cf15a2010-11-06 01:01:59183div.verseblock > div.content {
184 white-space: pre;
185}
186div.verseblock > div.attribution {
187 padding-top: 0.75em;
188 text-align: left;
189}
190/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31191div.verseblock + div.attribution {
192 text-align: left;
193}
Junio C Hamano9ae1a062006-07-10 08:12:34194
195div.admonitionblock .icon {
196 vertical-align: top;
197 font-size: 1.1em;
198 font-weight: bold;
199 text-decoration: underline;
200 color: #527bbd;
201 padding-right: 0.5em;
202}
203div.admonitionblock td.content {
204 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22205 border-left: 3px solid #dddddd;
Junio C Hamano9ae1a062006-07-10 08:12:34206}
207
208div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22209 border-left: 3px solid #dddddd;
210 padding-left: 0.5em;
Junio C Hamano9ae1a062006-07-10 08:12:34211}
212
Junio C Hamano9ae1a062006-07-10 08:12:34213div.imageblock div.content { padding-left: 0; }
Junio C Hamano9ae1a062006-07-10 08:12:34214span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59215a.image:visited { color: white; }
Junio C Hamano9ae1a062006-07-10 08:12:34216
217dl {
218 margin-top: 0.8em;
219 margin-bottom: 0.8em;
220}
221dt {
222 margin-top: 0.5em;
223 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59224 font-style: normal;
225 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:34226}
227dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59228 margin-top: 0.1em;
Junio C Hamano9ae1a062006-07-10 08:12:34229}
230
231ul, ol {
232 list-style-position: outside;
233}
Junio C Hamano68cf15a2010-11-06 01:01:59234ol.arabic {
235 list-style-type: decimal;
236}
237ol.loweralpha {
Junio C Hamano9ae1a062006-07-10 08:12:34238 list-style-type: lower-alpha;
239}
Junio C Hamano68cf15a2010-11-06 01:01:59240ol.upperalpha {
241 list-style-type: upper-alpha;
242}
243ol.lowerroman {
244 list-style-type: lower-roman;
245}
246ol.upperroman {
247 list-style-type: upper-roman;
248}
249
250div.compact ul, div.compact ol,
251div.compact p, div.compact p,
252div.compact div, div.compact div {
253 margin-top: 0.1em;
254 margin-bottom: 0.1em;
255}
Junio C Hamano9ae1a062006-07-10 08:12:34256
257div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31258 border: 3px solid #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:34259}
Junio C Hamano7bd050f2011-09-22 06:32:22260thead, p.table.header {
Junio C Hamano9ae1a062006-07-10 08:12:34261 font-family: sans-serif;
262 font-weight: bold;
263}
264tfoot {
265 font-weight: bold;
266}
Junio C Hamano68cf15a2010-11-06 01:01:59267td > div.verse {
268 white-space: pre;
269}
270p.table {
271 margin-top: 0;
272}
273/* Because the table frame attribute is overriden by CSS in most browsers. */
274div.tableblock > table[frame="void"] {
275 border-style: none;
276}
277div.tableblock > table[frame="hsides"] {
278 border-left-style: none;
279 border-right-style: none;
280}
281div.tableblock > table[frame="vsides"] {
282 border-top-style: none;
283 border-bottom-style: none;
284}
Junio C Hamano9ae1a062006-07-10 08:12:34285
Junio C Hamano68cf15a2010-11-06 01:01:59286
287div.hdlist {
Junio C Hamano9ae1a062006-07-10 08:12:34288 margin-top: 0.8em;
289 margin-bottom: 0.8em;
290}
Junio C Hamano68cf15a2010-11-06 01:01:59291div.hdlist tr {
292 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31293}
Junio C Hamano68cf15a2010-11-06 01:01:59294dt.hdlist1.strong, td.hdlist1.strong {
295 font-weight: bold;
296}
297td.hdlist1 {
Junio C Hamano9ae1a062006-07-10 08:12:34298 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59299 font-style: normal;
Junio C Hamano9ae1a062006-07-10 08:12:34300 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59301 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:34302}
Junio C Hamano68cf15a2010-11-06 01:01:59303td.hdlist2 {
Junio C Hamano9ae1a062006-07-10 08:12:34304 vertical-align: top;
305}
Junio C Hamano68cf15a2010-11-06 01:01:59306div.hdlist.compact tr {
307 margin: 0;
308 padding-bottom: 0;
309}
310
311.comment {
312 background: yellow;
313}
Junio C Hamano9ae1a062006-07-10 08:12:34314
Junio C Hamano7bd050f2011-09-22 06:32:22315.footnote, .footnoteref {
316 font-size: 0.8em;
317}
318
319span.footnote, span.footnoteref {
320 vertical-align: super;
321}
322
323#footnotes {
324 margin: 20px 0 20px 0;
325 padding: 7px 0 0 0;
326}
327
328#footnotes div.footnote {
329 margin: 0 0 5px 0;
330}
331
332#footnotes hr {
333 border: none;
334 border-top: 1px solid silver;
335 height: 1px;
336 text-align: left;
337 margin-left: 0;
338 width: 20%;
339 min-width: 100px;
340}
341
342
Junio C Hamano9ae1a062006-07-10 08:12:34343@media print {
344 div#footer-badges { display: none; }
345}
Junio C Hamanoba4b9282008-07-06 05:20:31346
Junio C Hamano7bd050f2011-09-22 06:32:22347div#toc {
348 margin-bottom: 2.5em;
349}
350
Junio C Hamanoba4b9282008-07-06 05:20:31351div#toctitle {
352 color: #527bbd;
353 font-family: sans-serif;
354 font-size: 1.1em;
355 font-weight: bold;
356 margin-top: 1.0em;
357 margin-bottom: 0.1em;
358}
359
360div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
361 margin-top: 0;
362 margin-bottom: 0;
363}
364div.toclevel2 {
365 margin-left: 2em;
366 font-size: 0.9em;
367}
368div.toclevel3 {
369 margin-left: 4em;
370 font-size: 0.9em;
371}
372div.toclevel4 {
373 margin-left: 6em;
374 font-size: 0.9em;
375}
Junio C Hamano68cf15a2010-11-06 01:01:59376/* Overrides for manpage documents */
377h1 {
378 padding-top: 0.5em;
379 padding-bottom: 0.5em;
380 border-top: 2px solid silver;
381 border-bottom: 2px solid silver;
382}
383h2 {
384 border-style: none;
385}
386div.sectionbody {
387 margin-left: 5%;
388}
389
390@media print {
391 div#toc { display: none; }
392}
393
Junio C Hamano9ae1a062006-07-10 08:12:34394/* Workarounds for IE6's broken and incomplete CSS2. */
395
396div.sidebar-content {
397 background: #ffffee;
398 border: 1px solid silver;
399 padding: 0.5em;
400}
401div.sidebar-title, div.image-title {
Junio C Hamano68cf15a2010-11-06 01:01:59402 color: #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:34403 font-family: sans-serif;
404 font-weight: bold;
405 margin-top: 0.0em;
406 margin-bottom: 0.5em;
407}
408
409div.listingblock div.content {
410 border: 1px solid silver;
411 background: #f4f4f4;
412 padding: 0.5em;
413}
414
Junio C Hamano68cf15a2010-11-06 01:01:59415div.quoteblock-attribution {
416 padding-top: 0.5em;
417 text-align: right;
418}
419
420div.verseblock-content {
421 white-space: pre;
422}
423div.verseblock-attribution {
424 padding-top: 0.75em;
425 text-align: left;
Junio C Hamano9ae1a062006-07-10 08:12:34426}
427
428div.exampleblock-content {
Junio C Hamano7bd050f2011-09-22 06:32:22429 border-left: 3px solid #dddddd;
Junio C Hamano9ae1a062006-07-10 08:12:34430 padding-left: 0.5em;
431}
Junio C Hamanoba4b9282008-07-06 05:20:31432
433/* IE6 sets dynamically generated links as visited. */
434div#toc a:visited { color: blue; }
Junio C Hamano9ae1a062006-07-10 08:12:34435</style>
Junio C Hamano7bd050f2011-09-22 06:32:22436<script type="text/javascript">
437/*<![CDATA[*/
438window.onload = function(){asciidoc.footnotes();}
439var asciidoc = { // Namespace.
440
441/////////////////////////////////////////////////////////////////////
442// Table Of Contents generator
443/////////////////////////////////////////////////////////////////////
444
445/* Author: Mihai Bazon, September 2002
446 * http://students.infoiasi.ro/~mishoo
447 *
448 * Table Of Content generator
449 * Version: 0.4
450 *
451 * Feel free to use this script under the terms of the GNU General Public
452 * License, as long as you do not remove or alter this notice.
453 */
454
455 /* modified by Troy D. Hanson, September 2006. License: GPL */
456 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
457
458// toclevels = 1..4.
459toc: function (toclevels) {
460
461 function getText(el) {
462 var text = "";
463 for (var i = el.firstChild; i != null; i = i.nextSibling) {
464 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
465 text += i.data;
466 else if (i.firstChild != null)
467 text += getText(i);
468 }
469 return text;
470 }
471
472 function TocEntry(el, text, toclevel) {
473 this.element = el;
474 this.text = text;
475 this.toclevel = toclevel;
476 }
477
478 function tocEntries(el, toclevels) {
479 var result = new Array;
480 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
481 // Function that scans the DOM tree for header elements (the DOM2
482 // nodeIterator API would be a better technique but not supported by all
483 // browsers).
484 var iterate = function (el) {
485 for (var i = el.firstChild; i != null; i = i.nextSibling) {
486 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
487 var mo = re.exec(i.tagName);
488 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
489 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
490 }
491 iterate(i);
492 }
493 }
494 }
495 iterate(el);
496 return result;
497 }
498
499 var toc = document.getElementById("toc");
500 var entries = tocEntries(document.getElementById("content"), toclevels);
501 for (var i = 0; i < entries.length; ++i) {
502 var entry = entries[i];
503 if (entry.element.id == "")
504 entry.element.id = "_toc_" + i;
505 var a = document.createElement("a");
506 a.href = "#" + entry.element.id;
507 a.appendChild(document.createTextNode(entry.text));
508 var div = document.createElement("div");
509 div.appendChild(a);
510 div.className = "toclevel" + entry.toclevel;
511 toc.appendChild(div);
512 }
513 if (entries.length == 0)
514 toc.parentNode.removeChild(toc);
515},
516
517
518/////////////////////////////////////////////////////////////////////
519// Footnotes generator
520/////////////////////////////////////////////////////////////////////
521
522/* Based on footnote generation code from:
523 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
524 */
525
526footnotes: function () {
527 var cont = document.getElementById("content");
528 var noteholder = document.getElementById("footnotes");
529 var spans = cont.getElementsByTagName("span");
530 var refs = {};
531 var n = 0;
532 for (i=0; i<spans.length; i++) {
533 if (spans[i].className == "footnote") {
534 n++;
535 // Use [\s\S] in place of . so multi-line matches work.
536 // Because JavaScript has no s (dotall) regex flag.
537 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
538 noteholder.innerHTML +=
539 "<div class='footnote' id='_footnote_" + n + "'>" +
540 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
541 n + "</a>. " + note + "</div>";
542 spans[i].innerHTML =
543 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
544 "' title='View footnote' class='footnote'>" + n + "</a>]";
545 var id =spans[i].getAttribute("id");
546 if (id != null) refs["#"+id] = n;
547 }
548 }
549 if (n == 0)
550 noteholder.parentNode.removeChild(noteholder);
551 else {
552 // Process footnoterefs.
553 for (i=0; i<spans.length; i++) {
554 if (spans[i].className == "footnoteref") {
555 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
556 href = href.match(/#.*/)[0]; // Because IE return full URL.
557 n = refs[href];
558 spans[i].innerHTML =
559 "[<a href='#_footnote_" + n +
560 "' title='View footnote' class='footnote'>" + n + "</a>]";
561 }
562 }
563 }
564}
565
566}
567/*]]>*/
568</script>
Junio C Hamano9ae1a062006-07-10 08:12:34569</head>
570<body>
571<div id="header">
572<h1>
573git-svn(1) Manual Page
574</h1>
575<h2>NAME</h2>
576<div class="sectionbody">
577<p>git-svn -
Junio C Hamano688eae02009-06-28 05:19:50578 Bidirectional operation between a Subversion repository and git
Junio C Hamano9ae1a062006-07-10 08:12:34579</p>
580</div>
581</div>
Junio C Hamano7bd050f2011-09-22 06:32:22582<div id="content">
Junio C Hamano68cf15a2010-11-06 01:01:59583<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34584<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59585<div class="verseblock">
586<div class="verseblock-content"><em>git svn</em> &lt;command&gt; [options] [arguments]</div>
587<div class="verseblock-attribution">
588</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:34589</div>
Junio C Hamanoba4b9282008-07-06 05:20:31590<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34591<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59592<div class="paragraph"><p><em>git svn</em> is a simple conduit for changesets between Subversion and git.
Junio C Hamano7f80ae82008-07-30 18:31:35593It provides a bidirectional flow of changes between a Subversion and a git
Junio C Hamanocb1c44f2008-08-06 06:19:33594repository.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59595<div class="paragraph"><p><em>git svn</em> can track a standard Subversion repository,
Junio C Hamano688eae02009-06-28 05:19:50596following the common "trunk/branches/tags" layout, with the --stdlayout option.
597It can also follow branches and tags in any layout with the -T/-t/-b options
598(see options to <em>init</em> below, and also the <em>clone</em> command).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59599<div class="paragraph"><p>Once tracking a Subversion repository (with any of the above methods), the git
Junio C Hamano7f80ae82008-07-30 18:31:35600repository can be updated from Subversion by the <em>fetch</em> command and
601Subversion updated from git by the <em>dcommit</em> command.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34602</div>
Junio C Hamanoba4b9282008-07-06 05:20:31603<h2 id="_commands">COMMANDS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34604<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59605<div class="dlist"><dl>
606<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31607<em>init</em>
Junio C Hamano9ae1a062006-07-10 08:12:34608</dt>
609<dd>
610<p>
Junio C Hamano00cb3712007-02-23 11:13:52611 Initializes an empty git repository with additional
Junio C Hamano48bc1ce2009-07-09 16:49:19612 metadata directories for <em>git svn</em>. The Subversion URL
Junio C Hamano00cb3712007-02-23 11:13:52613 may be specified as a command-line argument, or as full
614 URL arguments to -T/-t/-b. Optionally, the target
615 directory to operate on can be specified as a second
616 argument. Normally this command initializes the current
617 directory.
Junio C Hamano9ae1a062006-07-10 08:12:34618</p>
Junio C Hamano68cf15a2010-11-06 01:01:59619<div class="dlist"><dl>
620<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52621-T&lt;trunk_subdir&gt;
622</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59623<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52624--trunk=&lt;trunk_subdir&gt;
625</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59626<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52627-t&lt;tags_subdir&gt;
628</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59629<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52630--tags=&lt;tags_subdir&gt;
631</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59632<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52633-b&lt;branches_subdir&gt;
634</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59635<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52636--branches=&lt;branches_subdir&gt;
637</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59638<dt class="hdlist1">
Junio C Hamano377018d2007-08-23 08:41:31639-s
640</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59641<dt class="hdlist1">
Junio C Hamano377018d2007-08-23 08:41:31642--stdlayout
643</dt>
Junio C Hamano00cb3712007-02-23 11:13:52644<dd>
645<p>
646 These are optional command-line options for init. Each of
647 these flags can point to a relative repository path
Junio C Hamano688eae02009-06-28 05:19:50648 (--tags=project/tags) or a full url
649 (--tags=https://foo.org/project/tags).
650 You can specify more than one --tags and/or --branches options, in case
651 your Subversion repository places tags or branches under multiple paths.
652 The option --stdlayout is
Junio C Hamano377018d2007-08-23 08:41:31653 a shorthand way of setting trunk,tags,branches as the relative paths,
654 which is the Subversion default. If any of the other options are given
655 as well, they take precedence.
Junio C Hamano00cb3712007-02-23 11:13:52656</p>
657</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59658<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52659--no-metadata
660</dt>
661<dd>
662<p>
663 Set the <em>noMetadata</em> option in the [svn-remote] config.
Junio C Hamano657fd8a2010-10-07 00:01:24664 This option is not recommended, please read the <em>svn.noMetadata</em>
665 section of this manpage before using this option.
Junio C Hamano00cb3712007-02-23 11:13:52666</p>
667</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59668<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52669--use-svm-props
670</dt>
671<dd>
672<p>
673 Set the <em>useSvmProps</em> option in the [svn-remote] config.
674</p>
675</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59676<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52677--use-svnsync-props
678</dt>
679<dd>
680<p>
681 Set the <em>useSvnsyncProps</em> option in the [svn-remote] config.
682</p>
683</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59684<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52685--rewrite-root=&lt;URL&gt;
686</dt>
687<dd>
688<p>
689 Set the <em>rewriteRoot</em> option in the [svn-remote] config.
690</p>
691</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59692<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:29693--rewrite-uuid=&lt;UUID&gt;
694</dt>
695<dd>
696<p>
697 Set the <em>rewriteUUID</em> option in the [svn-remote] config.
698</p>
699</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59700<dt class="hdlist1">
Junio C Hamano63c2bc92011-02-28 06:41:28701--username=&lt;user&gt;
Junio C Hamano00cb3712007-02-23 11:13:52702</dt>
703<dd>
704<p>
705 For transports that SVN handles authentication for (http,
706 https, and plain svn), specify the username. For other
707 transports (eg svn+ssh://), you must include the username in
708 the URL, eg svn+ssh://foo@svn.bar.com/project
709</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36710</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59711<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:36712--prefix=&lt;prefix&gt;
713</dt>
714<dd>
715<p>
Junio C Hamano00cb3712007-02-23 11:13:52716 This allows one to specify a prefix which is prepended
717 to the names of remotes if trunk/branches/tags are
718 specified. The prefix does not automatically include a
719 trailing slash, so be sure you include one in the
Junio C Hamano0a2ad892007-06-24 22:23:12720 argument if that is what you want. If --branches/-b is
721 specified, the prefix must include a trailing slash.
722 Setting a prefix is useful if you wish to track multiple
723 projects that share a common repository.
Junio C Hamanoa3fd83c2007-03-02 10:34:36724</p>
Junio C Hamano00cb3712007-02-23 11:13:52725</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59726<dt class="hdlist1">
Junio C Hamano55344412009-04-12 18:31:19727--ignore-paths=&lt;regex&gt;
728</dt>
729<dd>
730<p>
731 When passed to <em>init</em> or <em>clone</em> this regular expression will
732 be preserved as a config key. See <em>fetch</em> for a description
733 of <em>--ignore-paths</em>.
734</p>
735</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59736<dt class="hdlist1">
Junio C Hamanoaa2cd762009-07-26 08:14:01737--no-minimize-url
738</dt>
739<dd>
740<p>
741 When tracking multiple directories (using --stdlayout,
742 --branches, or --tags options), git svn will attempt to connect
743 to the root (or highest allowed level) of the Subversion
744 repository. This default allows better tracking of history if
745 entire projects are moved within a repository, but may cause
746 issues on repositories where read access restrictions are in
747 place. Passing <em>--no-minimize-url</em> will allow git svn to
748 accept URLs as-is without attempting to connect to a higher
749 level directory. This option is off by default when only
750 one URL/branch is tracked (it would do little good).
751</p>
752</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31753</dl></div>
Junio C Hamano67fad6d2007-05-06 08:53:12754</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59755<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31756<em>fetch</em>
Junio C Hamano9ae1a062006-07-10 08:12:34757</dt>
758<dd>
759<p>
Junio C Hamano00cb3712007-02-23 11:13:52760 Fetch unfetched revisions from the Subversion remote we are
761 tracking. The name of the [svn-remote "&#8230;"] section in the
762 .git/config file may be specified as an optional command-line
763 argument.
Junio C Hamano9ae1a062006-07-10 08:12:34764</p>
Junio C Hamano68cf15a2010-11-06 01:01:59765<div class="dlist"><dl>
766<dt class="hdlist1">
Junio C Hamano8f4ac0d2009-01-19 08:35:36767--localtime
768</dt>
769<dd>
770<p>
771 Store Git commit times in the local timezone instead of UTC. This
Junio C Hamano48bc1ce2009-07-09 16:49:19772 makes <em>git log</em> (even without --date=local) show the same times
Junio C Hamano8f4ac0d2009-01-19 08:35:36773 that <tt>svn log</tt> would in the local timezone.
774</p>
Junio C Hamano68cf15a2010-11-06 01:01:59775<div class="paragraph"><p>This doesn&#8217;t interfere with interoperating with the Subversion
Junio C Hamano0df868a2009-08-19 07:28:28776repository you cloned from, but if you wish for your local Git
Junio C Hamano68cf15a2010-11-06 01:01:59777repository to be able to interoperate with someone else&#8217;s local Git
778repository, either don&#8217;t use this option or you should both use it in
Junio C Hamano0df868a2009-08-19 07:28:28779the same local timezone.</p></div>
Junio C Hamano55344412009-04-12 18:31:19780</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59781<dt class="hdlist1">
Junio C Hamano55344412009-04-12 18:31:19782--parent
783</dt>
784<dd>
785<p>
786 Fetch only from the SVN parent of the current HEAD.
787</p>
Junio C Hamano8f4ac0d2009-01-19 08:35:36788</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59789<dt class="hdlist1">
Junio C Hamanoa07e8162009-01-26 17:36:43790--ignore-paths=&lt;regex&gt;
791</dt>
792<dd>
793<p>
Junio C Hamano55344412009-04-12 18:31:19794 This allows one to specify a Perl regular expression that will
Junio C Hamanoa07e8162009-01-26 17:36:43795 cause skipping of all matching paths from checkout from SVN.
Junio C Hamano55344412009-04-12 18:31:19796 The <em>--ignore-paths</em> option should match for every <em>fetch</em>
797 (including automatic fetches due to <em>clone</em>, <em>dcommit</em>,
798 <em>rebase</em>, etc) on a given repository.
Junio C Hamanoa07e8162009-01-26 17:36:43799</p>
Junio C Hamano48bc1ce2009-07-09 16:49:19800<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:59801<div class="verseblock-content">config key: svn-remote.&lt;name&gt;.ignore-paths</div>
802<div class="verseblock-attribution">
803</div></div>
804<div class="paragraph"><p>If the ignore-paths config key is set and the command line option is
Junio C Hamano48bc1ce2009-07-09 16:49:19805also given, both regular expressions will be used.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59806<div class="paragraph"><p>Examples:</p></div>
807<div class="dlist"><dl>
808<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:19809Skip "doc*" directory for every fetch
810</dt>
811<dd>
Junio C Hamano48bc1ce2009-07-09 16:49:19812<div class="listingblock">
Junio C Hamano55344412009-04-12 18:31:19813<div class="content">
Junio C Hamano48bc1ce2009-07-09 16:49:19814<pre><tt>--ignore-paths="^doc"</tt></pre>
Junio C Hamanoa07e8162009-01-26 17:36:43815</div></div>
Junio C Hamano48bc1ce2009-07-09 16:49:19816</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59817<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:19818Skip "branches" and "tags" of first level directories
819</dt>
820<dd>
Junio C Hamano48bc1ce2009-07-09 16:49:19821<div class="listingblock">
Junio C Hamanoa07e8162009-01-26 17:36:43822<div class="content">
Junio C Hamano48bc1ce2009-07-09 16:49:19823<pre><tt>--ignore-paths="^[^/]+/(?:branches|tags)"</tt></pre>
Junio C Hamanoa07e8162009-01-26 17:36:43824</div></div>
825</dd>
Junio C Hamano8f4ac0d2009-01-19 08:35:36826</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:52827</dd>
Junio C Hamanoa1295452012-11-13 22:32:04828<dt class="hdlist1">
829--log-window-size=&lt;n&gt;
830</dt>
831<dd>
832<p>
833 Fetch &lt;n&gt; log entries per request when scanning Subversion history.
834 The default is 100. For very large Subversion repositories, larger
835 values may be needed for <em>clone</em>/<em>fetch</em> to complete in reasonable
836 time. But overly large values may lead to higher memory usage and
837 request timeouts.
838</p>
839</dd>
Junio C Hamano48bc1ce2009-07-09 16:49:19840</dl></div>
841</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59842<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52843<em>clone</em>
844</dt>
845<dd>
846<p>
847 Runs <em>init</em> and <em>fetch</em>. It will automatically create a
848 directory based on the basename of the URL passed to it;
849 or if a second argument is passed; it will create a directory
850 and work within that. It accepts all arguments that the
851 <em>init</em> and <em>fetch</em> commands accept; with the exception of
Junio C Hamano48bc1ce2009-07-09 16:49:19852 <em>--fetch-all</em> and <em>--parent</em>. After a repository is cloned,
853 the <em>fetch</em> command will be able to update revisions without
854 affecting the working tree; and the <em>rebase</em> command will be
855 able to update the working tree with the latest changes.
Junio C Hamano00cb3712007-02-23 11:13:52856</p>
Junio C Hamano7bd050f2011-09-22 06:32:22857<div class="dlist"><dl>
858<dt class="hdlist1">
859--preserve-empty-dirs
860</dt>
861<dd>
862<p>
863 Create a placeholder file in the local Git repository for each
864 empty directory fetched from Subversion. This includes directories
865 that become empty by removing all entries in the Subversion
866 repository (but not the directory itself). The placeholder files
867 are also tracked and removed when no longer necessary.
868</p>
869</dd>
870<dt class="hdlist1">
871--placeholder-filename=&lt;filename&gt;
872</dt>
873<dd>
874<p>
875 Set the name of placeholder files created by --preserve-empty-dirs.
876 Default: ".gitignore"
877</p>
878</dd>
879</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:52880</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59881<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52882<em>rebase</em>
883</dt>
884<dd>
885<p>
886 This fetches revisions from the SVN parent of the current HEAD
887 and rebases the current (uncommitted to SVN) work against it.
888</p>
Junio C Hamano68cf15a2010-11-06 01:01:59889<div class="paragraph"><p>This works similarly to <tt>svn update</tt> or <em>git pull</em> except that
Junio C Hamano48bc1ce2009-07-09 16:49:19890it preserves linear history with <em>git rebase</em> instead of
891<em>git merge</em> for ease of dcommitting with <em>git svn</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59892<div class="paragraph"><p>This accepts all options that <em>git svn fetch</em> and <em>git rebase</em>
Junio C Hamanofce7c7e2008-07-02 03:06:38893accept. However, <em>--fetch-all</em> only fetches from the current
Junio C Hamanoba4b9282008-07-06 05:20:31894[svn-remote], and not all [svn-remote] definitions.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59895<div class="paragraph"><p>Like <em>git rebase</em>; this requires that the working tree be clean
Junio C Hamanoba4b9282008-07-06 05:20:31896and have no uncommitted changes.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59897<div class="dlist"><dl>
898<dt class="hdlist1">
Junio C Hamano103ad7f2007-03-14 11:19:26899-l
900</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59901<dt class="hdlist1">
Junio C Hamano103ad7f2007-03-14 11:19:26902--local
903</dt>
904<dd>
905<p>
Junio C Hamano48bc1ce2009-07-09 16:49:19906 Do not fetch remotely; only run <em>git rebase</em> against the
Junio C Hamano103ad7f2007-03-14 11:19:26907 last fetched commit from the upstream SVN.
908</p>
909</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31910</dl></div>
Junio C Hamano67fad6d2007-05-06 08:53:12911</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59912<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31913<em>dcommit</em>
914</dt>
915<dd>
916<p>
Junio C Hamanof94fd6c2012-05-17 22:55:14917 Commit each diff from the current branch directly to the SVN
Junio C Hamano6b2cee12006-08-26 08:43:31918 repository, and then rebase or reset (depending on whether or
Junio C Hamano79770b62007-01-07 07:43:58919 not there is a diff between SVN and head). This will create
920 a revision in SVN for each commit in git.
Junio C Hamano6b2cee12006-08-26 08:43:31921</p>
Junio C Hamanof94fd6c2012-05-17 22:55:14922<div class="paragraph"><p>When an optional git branch name (or a git commit object name)
923is specified as an argument, the subcommand works on the specified
924branch, not on the current branch.</p></div>
925<div class="paragraph"><p>Use of <em>dcommit</em> is preferred to <em>set-tree</em> (below).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59926<div class="dlist"><dl>
927<dt class="hdlist1">
Junio C Hamano67fad6d2007-05-06 08:53:12928--no-rebase
929</dt>
930<dd>
931<p>
932 After committing, do not rebase or reset.
933</p>
934</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59935<dt class="hdlist1">
Junio C Hamanofaa1e502008-08-10 03:55:58936--commit-url &lt;URL&gt;
937</dt>
938<dd>
939<p>
940 Commit to this SVN URL (the full path). This is intended to
Junio C Hamano48bc1ce2009-07-09 16:49:19941 allow existing <em>git svn</em> repositories created with one transport
Junio C Hamanofaa1e502008-08-10 03:55:58942 method (e.g. <tt>svn://</tt> or <tt>http://</tt> for anonymous read) to be
943 reused if a user is later given access to an alternate transport
944 method (e.g. <tt>svn+ssh://</tt> or <tt>https://</tt>) for commit.
945</p>
Junio C Hamano48bc1ce2009-07-09 16:49:19946<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:59947<div class="verseblock-content">config key: svn-remote.&lt;name&gt;.commiturl
948config key: svn.commiturl (overwrites all svn-remote.&lt;name&gt;.commiturl options)</div>
949<div class="verseblock-attribution">
950</div></div>
951<div class="paragraph"><p>Using this option for any other purpose (don&#8217;t ask) is very strongly
Junio C Hamano48bc1ce2009-07-09 16:49:19952discouraged.</p></div>
Junio C Hamanofaa1e502008-08-10 03:55:58953</dd>
Junio C Hamano0a901522011-04-19 22:42:05954<dt class="hdlist1">
955--mergeinfo=&lt;mergeinfo&gt;
956</dt>
957<dd>
958<p>
959 Add the given merge information during the dcommit
960 (e.g. <tt>--mergeinfo="/branches/foo:1-10"</tt>). All svn server versions can
961 store this information (as a property), and svn clients starting from
Junio C Hamano7bd050f2011-09-22 06:32:22962 version 1.5 can make use of it. To specify merge information from multiple
963 branches, use a single space character between the branches
964 (<tt>--mergeinfo="/branches/foo:1-10 /branches/bar:3,5-6,8"</tt>)
Junio C Hamano0a901522011-04-19 22:42:05965</p>
Junio C Hamano7bd050f2011-09-22 06:32:22966<div class="verseblock">
967<div class="verseblock-content">config key: svn.pushmergeinfo</div>
968<div class="verseblock-attribution">
969</div></div>
970<div class="paragraph"><p>This option will cause git-svn to attempt to automatically populate the
971svn:mergeinfo property in the SVN repository when possible. Currently, this can
972only be done when dcommitting non-fast-forward merges where all parents but the
973first have already been pushed into SVN.</p></div>
Junio C Hamano0a901522011-04-19 22:42:05974</dd>
Junio C Hamano483c5782011-10-16 20:42:22975<dt class="hdlist1">
976--interactive
977</dt>
978<dd>
979<p>
980 Ask the user to confirm that a patch set should actually be sent to SVN.
981 For each patch, one may answer "yes" (accept this patch), "no" (discard this
982 patch), "all" (accept all patches), or "quit".
983 <br />
984 <em>git svn dcommit</em> returns immediately if answer if "no" or "quit", without
985 commiting anything to SVN.
986</p>
987</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31988</dl></div>
Junio C Hamano6b2cee12006-08-26 08:43:31989</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59990<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:42991<em>branch</em>
992</dt>
993<dd>
994<p>
995 Create a branch in the SVN repository.
996</p>
Junio C Hamano68cf15a2010-11-06 01:01:59997<div class="dlist"><dl>
998<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:42999-m
1000</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591001<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421002--message
1003</dt>
1004<dd>
1005<p>
1006 Allows to specify the commit message.
1007</p>
1008</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591009<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421010-t
1011</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591012<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421013--tag
1014</dt>
1015<dd>
1016<p>
1017 Create a tag by using the tags_subdir instead of the branches_subdir
1018 specified during git svn init.
1019</p>
1020</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591021<dt class="hdlist1">
Junio C Hamano688eae02009-06-28 05:19:501022-d
1023</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591024<dt class="hdlist1">
Junio C Hamano688eae02009-06-28 05:19:501025--destination
1026</dt>
1027<dd>
1028<p>
1029 If more than one --branches (or --tags) option was given to the <em>init</em>
1030 or <em>clone</em> command, you must provide the location of the branch (or
1031 tag) you wish to create in the SVN repository. The value of this
1032 option must match one of the paths specified by a --branches (or
1033 --tags) option. You can see these paths with the commands
1034</p>
1035<div class="literalblock">
1036<div class="content">
1037<pre><tt>git config --get-all svn-remote.&lt;name&gt;.branches
1038git config --get-all svn-remote.&lt;name&gt;.tags</tt></pre>
1039</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591040<div class="paragraph"><p>where &lt;name&gt; is the name of the SVN repository as specified by the -R option to
Junio C Hamano688eae02009-06-28 05:19:501041<em>init</em> (or "svn" by default).</p></div>
1042</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591043<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:291044--username
1045</dt>
1046<dd>
1047<p>
1048 Specify the SVN username to perform the commit as. This option overrides
Junio C Hamano072d22b2010-05-10 02:49:381049 the <em>username</em> configuration property.
Junio C Hamanod0d892c2010-01-24 20:06:291050</p>
1051</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591052<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:291053--commit-url
1054</dt>
1055<dd>
1056<p>
1057 Use the specified URL to connect to the destination Subversion
1058 repository. This is useful in cases where the source SVN
1059 repository is read-only. This option overrides configuration
1060 property <em>commiturl</em>.
1061</p>
1062<div class="literalblock">
1063<div class="content">
1064<pre><tt>git config --get-all svn-remote.&lt;name&gt;.commiturl</tt></pre>
1065</div></div>
1066</dd>
Junio C Hamanoa476efa2008-10-10 15:31:421067</dl></div>
1068</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591069<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421070<em>tag</em>
1071</dt>
1072<dd>
1073<p>
1074 Create a tag in the SVN repository. This is a shorthand for
1075 <em>branch -t</em>.
1076</p>
1077</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591078<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321079<em>log</em>
1080</dt>
1081<dd>
1082<p>
1083 This should make it easy to look up svn log messages when svn
1084 users refer to -r/--revision numbers.
1085</p>
Junio C Hamano68cf15a2010-11-06 01:01:591086<div class="paragraph"><p>The following features from &#8216;svn log&#8217; are supported:</p></div>
1087<div class="dlist"><dl>
1088<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191089-r &lt;n&gt;[:&lt;n&gt;]
1090</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591091<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191092--revision=&lt;n&gt;[:&lt;n&gt;]
Junio C Hamanoa3fd83c2007-03-02 10:34:361093</dt>
1094<dd>
1095<p>
1096 is supported, non-numeric args are not:
1097 HEAD, NEXT, BASE, PREV, etc &#8230;
1098</p>
Junio C Hamano43d01342006-10-12 04:07:321099</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591100<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191101-v
1102</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591103<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191104--verbose
Junio C Hamanoa3fd83c2007-03-02 10:34:361105</dt>
1106<dd>
1107<p>
Junio C Hamano68cf15a2010-11-06 01:01:591108 it&#8217;s not completely compatible with the --verbose
Junio C Hamanoa3fd83c2007-03-02 10:34:361109 output in svn log, but reasonably close.
1110</p>
1111</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591112<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361113--limit=&lt;n&gt;
1114</dt>
1115<dd>
1116<p>
Junio C Hamano68cf15a2010-11-06 01:01:591117 is NOT the same as --max-count, doesn&#8217;t count
Junio C Hamanoa3fd83c2007-03-02 10:34:361118 merged/excluded commits
1119</p>
1120</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591121<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361122--incremental
1123</dt>
1124<dd>
1125<p>
1126 supported
1127</p>
1128</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311129</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591130<div class="paragraph"><p>New features:</p></div>
1131<div class="dlist"><dl>
1132<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361133--show-commit
1134</dt>
1135<dd>
1136<p>
1137 shows the git commit sha1, as well
1138</p>
1139</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591140<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361141--oneline
1142</dt>
1143<dd>
1144<p>
1145 our version of --pretty=oneline
1146</p>
1147</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311148</dl></div>
Junio C Hamano24bc09a2008-02-28 00:27:441149<div class="admonitionblock">
1150<table><tr>
1151<td class="icon">
1152<div class="title">Note</div>
1153</td>
1154<td class="content">SVN itself only stores times in UTC and nothing else. The regular svn
1155client converts the UTC time to the local time (or based on the TZ=
1156environment). This command has the same behaviour.</td>
1157</tr></table>
1158</div>
Junio C Hamano68cf15a2010-11-06 01:01:591159<div class="paragraph"><p>Any other arguments are passed directly to <em>git log</em></p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361160</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591161<dt class="hdlist1">
Junio C Hamano9c334152008-02-12 03:18:521162<em>blame</em>
1163</dt>
1164<dd>
1165<p>
Junio C Hamano869bb802008-05-12 00:29:471166 Show what revision and author last modified each line of a file. The
1167 output of this mode is format-compatible with the output of
Junio C Hamano68cf15a2010-11-06 01:01:591168 &#8216;svn blame&#8217; by default. Like the SVN blame command,
Junio C Hamano8fb66e52011-10-05 20:59:511169 local uncommitted changes in the working tree are ignored;
Junio C Hamano869bb802008-05-12 00:29:471170 the version of the file in the HEAD revision is annotated. Unknown
Junio C Hamano48bc1ce2009-07-09 16:49:191171 arguments are passed directly to <em>git blame</em>.
Junio C Hamano9c334152008-02-12 03:18:521172</p>
Junio C Hamano68cf15a2010-11-06 01:01:591173<div class="dlist"><dl>
1174<dt class="hdlist1">
Junio C Hamano869bb802008-05-12 00:29:471175--git-format
1176</dt>
1177<dd>
1178<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191179 Produce output in the same format as <em>git blame</em>, but with
Junio C Hamano869bb802008-05-12 00:29:471180 SVN revision numbers instead of git commit hashes. In this mode,
Junio C Hamano68cf15a2010-11-06 01:01:591181 changes that haven&#8217;t been committed to SVN (including local
Junio C Hamano869bb802008-05-12 00:29:471182 working-copy edits) are shown as revision 0.
1183</p>
1184</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311185</dl></div>
Junio C Hamano9c334152008-02-12 03:18:521186</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591187<dt class="hdlist1">
Junio C Hamano469d60e2007-04-29 18:30:341188<em>find-rev</em>
1189</dt>
1190<dd>
1191<p>
1192 When given an SVN revision number of the form <em>rN</em>, returns the
Junio C Hamanob63afff2007-05-01 03:05:551193 corresponding git commit hash (this can optionally be followed by a
1194 tree-ish to specify which branch should be searched). When given a
1195 tree-ish, returns the corresponding SVN revision number.
Junio C Hamano469d60e2007-04-29 18:30:341196</p>
1197</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591198<dt class="hdlist1">
Junio C Hamano4bf6dca2006-12-21 02:25:571199<em>set-tree</em>
Junio C Hamano9ae1a062006-07-10 08:12:341200</dt>
1201<dd>
1202<p>
Junio C Hamano43d01342006-10-12 04:07:321203 You should consider using <em>dcommit</em> instead of this command.
Junio C Hamano9ae1a062006-07-10 08:12:341204 Commit specified commit or tree objects to SVN. This relies on
1205 your imported fetch data being up-to-date. This makes
1206 absolutely no attempts to do patching when committing to SVN, it
1207 simply overwrites files with those specified in the tree or
1208 commit. All merging is assumed to have taken place
Junio C Hamano48bc1ce2009-07-09 16:49:191209 independently of <em>git svn</em> functions.
Junio C Hamano9ae1a062006-07-10 08:12:341210</p>
1211</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591212<dt class="hdlist1">
Junio C Hamano47d68a52008-05-06 06:35:401213<em>create-ignore</em>
1214</dt>
1215<dd>
1216<p>
1217 Recursively finds the svn:ignore property on directories and
1218 creates matching .gitignore files. The resulting files are staged to
Junio C Hamanofeeb1be2008-05-22 00:53:351219 be committed, but are not committed. Use -r/--revision to refer to a
Junio C Hamanocb1c44f2008-08-06 06:19:331220 specific revision.
Junio C Hamano47d68a52008-05-06 06:35:401221</p>
1222</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591223<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311224<em>show-ignore</em>
Junio C Hamano9ae1a062006-07-10 08:12:341225</dt>
1226<dd>
1227<p>
1228 Recursively finds and lists the svn:ignore property on
1229 directories. The output is suitable for appending to
1230 the $GIT_DIR/info/exclude file.
1231</p>
1232</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591233<dt class="hdlist1">
Junio C Hamanoa5574462009-11-18 07:39:281234<em>mkdirs</em>
1235</dt>
1236<dd>
1237<p>
1238 Attempts to recreate empty directories that core git cannot track
1239 based on information in $GIT_DIR/svn/&lt;refname&gt;/unhandled.log files.
1240 Empty directories are automatically recreated when using
1241 "git svn clone" and "git svn rebase", so "mkdirs" is intended
1242 for use after commands like "git checkout" or "git reset".
Junio C Hamano209ebe82011-04-27 21:09:591243 (See the svn-remote.&lt;name&gt;.automkdirs config file option for
1244 more information.)
Junio C Hamanoa5574462009-11-18 07:39:281245</p>
1246</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591247<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321248<em>commit-diff</em>
1249</dt>
1250<dd>
1251<p>
1252 Commits the diff of two tree-ish arguments from the
Junio C Hamano48bc1ce2009-07-09 16:49:191253 command-line. This command does not rely on being inside an <tt>git svn
Junio C Hamanofce7c7e2008-07-02 03:06:381254 init</tt>-ed repository. This command takes three arguments, (a) the
Junio C Hamano43d01342006-10-12 04:07:321255 original tree to diff against, (b) the new tree result, (c) the
1256 URL of the target Subversion repository. The final argument
Junio C Hamano48bc1ce2009-07-09 16:49:191257 (URL) may be omitted if you are working from a <em>git svn</em>-aware
1258 repository (that has been <tt>init</tt>-ed with <em>git svn</em>).
Junio C Hamano23db8852006-11-09 23:35:531259 The -r&lt;revision&gt; option is required for this.
Junio C Hamano43d01342006-10-12 04:07:321260</p>
1261</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591262<dt class="hdlist1">
Junio C Hamanoa0970542007-11-23 08:43:301263<em>info</em>
1264</dt>
1265<dd>
1266<p>
1267 Shows information about a file or directory similar to what
Junio C Hamano68cf15a2010-11-06 01:01:591268 &#8216;svn info&#8217; provides. Does not currently support a -r/--revision
Junio C Hamanoa0970542007-11-23 08:43:301269 argument. Use the --url option to output only the value of the
1270 <em>URL:</em> field.
1271</p>
1272</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591273<dt class="hdlist1">
Junio C Hamanofeeb1be2008-05-22 00:53:351274<em>proplist</em>
1275</dt>
1276<dd>
1277<p>
1278 Lists the properties stored in the Subversion repository about a
1279 given file or directory. Use -r/--revision to refer to a specific
1280 Subversion revision.
1281</p>
1282</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591283<dt class="hdlist1">
Junio C Hamanofeeb1be2008-05-22 00:53:351284<em>propget</em>
1285</dt>
1286<dd>
1287<p>
1288 Gets the Subversion property given as the first argument, for a
1289 file. A specific revision can be specified with -r/--revision.
1290</p>
1291</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591292<dt class="hdlist1">
Junio C Hamanofeeb1be2008-05-22 00:53:351293<em>show-externals</em>
1294</dt>
1295<dd>
1296<p>
1297 Shows the Subversion externals. Use -r/--revision to specify a
1298 specific revision.
1299</p>
1300</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591301<dt class="hdlist1">
Junio C Hamanoaa2cd762009-07-26 08:14:011302<em>gc</em>
1303</dt>
1304<dd>
1305<p>
1306 Compress $GIT_DIR/svn/&lt;refname&gt;/unhandled.log files in .git/svn
1307 and remove $GIT_DIR/svn/&lt;refname&gt;index files in .git/svn.
1308</p>
1309</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591310<dt class="hdlist1">
Junio C Hamano688eae02009-06-28 05:19:501311<em>reset</em>
1312</dt>
1313<dd>
1314<p>
1315 Undoes the effects of <em>fetch</em> back to the specified revision.
1316 This allows you to re-<em>fetch</em> an SVN revision. Normally the
1317 contents of an SVN revision should never change and <em>reset</em>
1318 should not be necessary. However, if SVN permissions change,
1319 or if you alter your --ignore-paths option, a <em>fetch</em> may fail
1320 with "not found in commit" (file not previously visible) or
1321 "checksum mismatch" (missed a modification). If the problem
1322 file cannot be ignored forever (with --ignore-paths) the only
1323 way to repair the repo is to use <em>reset</em>.
1324</p>
Junio C Hamano68cf15a2010-11-06 01:01:591325<div class="paragraph"><p>Only the rev_map and refs/remotes/git-svn are changed. Follow <em>reset</em>
Junio C Hamano48bc1ce2009-07-09 16:49:191326with a <em>fetch</em> and then <em>git reset</em> or <em>git rebase</em> to move local
Junio C Hamano688eae02009-06-28 05:19:501327branches onto the new tree.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591328<div class="dlist"><dl>
1329<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191330-r &lt;n&gt;
1331</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591332<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191333--revision=&lt;n&gt;
Junio C Hamano688eae02009-06-28 05:19:501334</dt>
1335<dd>
1336<p>
1337 Specify the most recent revision to keep. All later revisions
1338 are discarded.
1339</p>
1340</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591341<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191342-p
1343</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591344<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191345--parent
Junio C Hamano688eae02009-06-28 05:19:501346</dt>
1347<dd>
1348<p>
1349 Discard the specified revision as well, keeping the nearest
1350 parent instead.
1351</p>
1352</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591353<dt class="hdlist1">
Junio C Hamano688eae02009-06-28 05:19:501354Example:
1355</dt>
1356<dd>
1357<p>
1358Assume you have local changes in "master", but you need to refetch "r2".
1359</p>
1360<div class="listingblock">
1361<div class="content">
1362<pre><tt> r1---r2---r3 remotes/git-svn
1363 \
1364 A---B master</tt></pre>
1365</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591366<div class="paragraph"><p>Fix the ignore-paths or SVN permissions problem that caused "r2" to
Junio C Hamano688eae02009-06-28 05:19:501367be incomplete in the first place. Then:</p></div>
1368<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591369<div class="verseblock-content">git svn reset -r2 -p
1370git svn fetch</div>
1371<div class="verseblock-attribution">
1372</div></div>
Junio C Hamano688eae02009-06-28 05:19:501373<div class="listingblock">
1374<div class="content">
1375<pre><tt> r1---r2'--r3' remotes/git-svn
1376 \
1377 r2---r3---A---B master</tt></pre>
1378</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591379<div class="paragraph"><p>Then fixup "master" with <em>git rebase</em>.
Junio C Hamano48bc1ce2009-07-09 16:49:191380Do NOT use <em>git merge</em> or your history will not be compatible with a
Junio C Hamano688eae02009-06-28 05:19:501381future <em>dcommit</em>!</p></div>
1382<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591383<div class="verseblock-content">git rebase --onto remotes/git-svn A^ master</div>
1384<div class="verseblock-attribution">
1385</div></div>
Junio C Hamano688eae02009-06-28 05:19:501386<div class="listingblock">
1387<div class="content">
1388<pre><tt> r1---r2'--r3' remotes/git-svn
1389 \
1390 A'--B' master</tt></pre>
1391</div></div>
1392</dd>
1393</dl></div>
1394</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311395</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:341396</div>
Junio C Hamanoba4b9282008-07-06 05:20:311397<h2 id="_options">OPTIONS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341398<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591399<div class="dlist"><dl>
1400<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171401--shared[=(false|true|umask|group|all|world|everybody)]
Junio C Hamano43d01342006-10-12 04:07:321402</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591403<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321404--template=&lt;template_directory&gt;
1405</dt>
1406<dd>
1407<p>
1408 Only used with the <em>init</em> command.
Junio C Hamano48bc1ce2009-07-09 16:49:191409 These are passed directly to <em>git init</em>.
Junio C Hamano43d01342006-10-12 04:07:321410</p>
1411</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591412<dt class="hdlist1">
Junio C Hamano63c2bc92011-02-28 06:41:281413-r &lt;arg&gt;
Junio C Hamano9ae1a062006-07-10 08:12:341414</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591415<dt class="hdlist1">
Junio C Hamano63c2bc92011-02-28 06:41:281416--revision &lt;arg&gt;
Junio C Hamano9ae1a062006-07-10 08:12:341417</dt>
1418<dd>
1419<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191420 Used with the <em>fetch</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:341421</p>
Junio C Hamano68cf15a2010-11-06 01:01:591422<div class="paragraph"><p>This allows revision ranges for partial/cauterized history
Junio C Hamano00cb3712007-02-23 11:13:521423to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges),
Junio C Hamanoba4b9282008-07-06 05:20:311424$NUMBER:HEAD, and BASE:$NUMBER are all supported.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591425<div class="paragraph"><p>This can allow you to make partial mirrors when running fetch;
Junio C Hamano00cb3712007-02-23 11:13:521426but is generally not recommended because history will be skipped
Junio C Hamanoba4b9282008-07-06 05:20:311427and lost.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341428</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591429<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341430-
1431</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591432<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341433--stdin
1434</dt>
1435<dd>
1436<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191437 Only used with the <em>set-tree</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:341438</p>
Junio C Hamano68cf15a2010-11-06 01:01:591439<div class="paragraph"><p>Read a list of commits from stdin and commit them in reverse
Junio C Hamano9ae1a062006-07-10 08:12:341440order. Only the leading sha1 is read from each line, so
Junio C Hamano48bc1ce2009-07-09 16:49:191441<em>git rev-list --pretty=oneline</em> output can be used.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341442</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591443<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341444--rmdir
1445</dt>
1446<dd>
1447<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191448 Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:341449</p>
Junio C Hamano68cf15a2010-11-06 01:01:591450<div class="paragraph"><p>Remove directories from the SVN tree if there are no files left
Junio C Hamano9ae1a062006-07-10 08:12:341451behind. SVN can version empty directories, and they are not
1452removed by default if there are no files left in them. git
1453cannot version empty directories. Enabling this flag will make
Junio C Hamanoba4b9282008-07-06 05:20:311454the commit to SVN act like git.</p></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191455<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591456<div class="verseblock-content">config key: svn.rmdir</div>
1457<div class="verseblock-attribution">
1458</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341459</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591460<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341461-e
1462</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591463<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341464--edit
1465</dt>
1466<dd>
1467<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191468 Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:341469</p>
Junio C Hamano68cf15a2010-11-06 01:01:591470<div class="paragraph"><p>Edit the commit message before committing to SVN. This is off by
Junio C Hamano9ae1a062006-07-10 08:12:341471default for objects that are commits, and forced on when committing
Junio C Hamanoba4b9282008-07-06 05:20:311472tree objects.</p></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191473<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591474<div class="verseblock-content">config key: svn.edit</div>
1475<div class="verseblock-attribution">
1476</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341477</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591478<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341479-l&lt;num&gt;
1480</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591481<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341482--find-copies-harder
1483</dt>
1484<dd>
1485<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191486 Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:341487</p>
Junio C Hamano68cf15a2010-11-06 01:01:591488<div class="paragraph"><p>They are both passed directly to <em>git diff-tree</em>; see
Junio C Hamanoa28a9202012-06-21 07:08:231489<a href="git-diff-tree.html">git-diff-tree(1)</a> for more information.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311490<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591491<div class="verseblock-content">config key: svn.l
1492config key: svn.findcopiesharder</div>
1493<div class="verseblock-attribution">
1494</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341495</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591496<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341497-A&lt;filename&gt;
1498</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591499<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341500--authors-file=&lt;filename&gt;
1501</dt>
1502<dd>
1503<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191504 Syntax is compatible with the file used by <em>git cvsimport</em>:
Junio C Hamano9ae1a062006-07-10 08:12:341505</p>
Junio C Hamano9ae1a062006-07-10 08:12:341506<div class="listingblock">
1507<div class="content">
Junio C Hamano6b2cee12006-08-26 08:43:311508<pre><tt> loginname = Joe User &lt;user@example.com&gt;</tt></pre>
Junio C Hamano9ae1a062006-07-10 08:12:341509</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591510<div class="paragraph"><p>If this option is specified and <em>git svn</em> encounters an SVN
Junio C Hamano48bc1ce2009-07-09 16:49:191511committer name that does not exist in the authors-file, <em>git svn</em>
Junio C Hamano9ae1a062006-07-10 08:12:341512will abort operation. The user will then have to add the
Junio C Hamano48bc1ce2009-07-09 16:49:191513appropriate entry. Re-running the previous <em>git svn</em> command
Junio C Hamanoba4b9282008-07-06 05:20:311514after the authors-file is modified should continue operation.</p></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191515<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591516<div class="verseblock-content">config key: svn.authorsfile</div>
1517<div class="verseblock-attribution">
1518</div></div>
Junio C Hamano43d01342006-10-12 04:07:321519</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591520<dt class="hdlist1">
Junio C Hamano52d5def2009-05-21 16:27:431521--authors-prog=&lt;filename&gt;
1522</dt>
1523<dd>
1524<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191525 If this option is specified, for each SVN committer name that
1526 does not exist in the authors file, the given file is executed
1527 with the committer name as the first argument. The program is
1528 expected to return a single line of the form "Name &lt;email&gt;",
1529 which will be treated as if included in the authors file.
Junio C Hamano52d5def2009-05-21 16:27:431530</p>
1531</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591532<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321533-q
1534</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591535<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321536--quiet
1537</dt>
1538<dd>
1539<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191540 Make <em>git svn</em> less verbose. Specify a second time to make it
Junio C Hamano9572e922009-04-02 06:52:031541 even less verbose.
Junio C Hamano43d01342006-10-12 04:07:321542</p>
1543</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591544<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321545--repack[=&lt;n&gt;]
1546</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591547<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361548--repack-flags=&lt;flags&gt;
1549</dt>
Junio C Hamano43d01342006-10-12 04:07:321550<dd>
1551<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191552 These should help keep disk usage sane for large fetches with
1553 many revisions.
Junio C Hamano43d01342006-10-12 04:07:321554</p>
Junio C Hamano68cf15a2010-11-06 01:01:591555<div class="paragraph"><p>--repack takes an optional argument for the number of revisions
Junio C Hamano43d01342006-10-12 04:07:321556to fetch before repacking. This defaults to repacking every
Junio C Hamanoba4b9282008-07-06 05:20:3115571000 commits fetched if no argument is specified.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591558<div class="paragraph"><p>--repack-flags are passed directly to <em>git repack</em>.</p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361559<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591560<div class="verseblock-content">config key: svn.repack
1561config key: svn.repackflags</div>
1562<div class="verseblock-attribution">
1563</div></div>
Junio C Hamano6b2cee12006-08-26 08:43:311564</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591565<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311566-m
1567</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591568<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311569--merge
1570</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591571<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311572-s&lt;strategy&gt;
1573</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591574<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311575--strategy=&lt;strategy&gt;
1576</dt>
Junio C Hamanof94fd6c2012-05-17 22:55:141577<dt class="hdlist1">
1578-p
1579</dt>
1580<dt class="hdlist1">
1581--preserve-merges
1582</dt>
Junio C Hamano6b2cee12006-08-26 08:43:311583<dd>
1584<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191585 These are only used with the <em>dcommit</em> and <em>rebase</em> commands.
Junio C Hamano6b2cee12006-08-26 08:43:311586</p>
Junio C Hamano68cf15a2010-11-06 01:01:591587<div class="paragraph"><p>Passed directly to <em>git rebase</em> when using <em>dcommit</em> if a
Junio C Hamano48bc1ce2009-07-09 16:49:191588<em>git reset</em> cannot be used (see <em>dcommit</em>).</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311589</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591590<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311591-n
1592</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591593<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311594--dry-run
1595</dt>
1596<dd>
1597<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191598 This can be used with the <em>dcommit</em>, <em>rebase</em>, <em>branch</em> and
1599 <em>tag</em> commands.
Junio C Hamano6b2cee12006-08-26 08:43:311600</p>
Junio C Hamano68cf15a2010-11-06 01:01:591601<div class="paragraph"><p>For <em>dcommit</em>, print out the series of git arguments that would show
Junio C Hamanoba4b9282008-07-06 05:20:311602which diffs would be committed to SVN.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591603<div class="paragraph"><p>For <em>rebase</em>, display the local branch associated with the upstream svn
Junio C Hamano9e1793f2008-06-02 07:31:161604repository associated with the current branch and the URL of svn
Junio C Hamanoba4b9282008-07-06 05:20:311605repository that will be fetched from.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591606<div class="paragraph"><p>For <em>branch</em> and <em>tag</em>, display the urls that will be used for copying when
Junio C Hamanoa476efa2008-10-10 15:31:421607creating the branch or tag.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311608</dd>
Junio C Hamano4f018922011-05-01 23:54:061609<dt class="hdlist1">
1610--use-log-author
1611</dt>
1612<dd>
1613<p>
1614 When retrieving svn commits into git (as part of <em>fetch</em>, <em>rebase</em>, or
1615 <em>dcommit</em> operations), look for the first <tt>From:</tt> or <tt>Signed-off-by:</tt> line
1616 in the log message and use that as the author string.
1617</p>
1618</dd>
1619<dt class="hdlist1">
1620--add-author-from
1621</dt>
1622<dd>
1623<p>
1624 When committing to svn from git (as part of <em>commit-diff</em>, <em>set-tree</em> or <em>dcommit</em>
1625 operations), if the existing log message doesn&#8217;t already have a
1626 <tt>From:</tt> or <tt>Signed-off-by:</tt> line, append a <tt>From:</tt> line based on the
1627 git commit&#8217;s author string. If you use this, then <tt>--use-log-author</tt>
1628 will retrieve a valid author string for all commits.
1629</p>
1630</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311631</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:341632</div>
Junio C Hamanoba4b9282008-07-06 05:20:311633<h2 id="_advanced_options">ADVANCED OPTIONS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341634<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591635<div class="dlist"><dl>
1636<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341637-i&lt;GIT_SVN_ID&gt;
1638</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591639<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341640--id &lt;GIT_SVN_ID&gt;
1641</dt>
1642<dd>
1643<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191644 This sets GIT_SVN_ID (instead of using the environment). This
1645 allows the user to override the default refname to fetch from
1646 when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands
1647 no longer require this switch as an argument.
Junio C Hamano00cb3712007-02-23 11:13:521648</p>
1649</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591650<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521651-R&lt;remote name&gt;
1652</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591653<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521654--svn-remote &lt;remote name&gt;
1655</dt>
1656<dd>
1657<p>
1658 Specify the [svn-remote "&lt;remote name&gt;"] section to use,
1659 this allows SVN multiple repositories to be tracked.
1660 Default: "svn"
Junio C Hamano9ae1a062006-07-10 08:12:341661</p>
1662</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591663<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321664--follow-parent
1665</dt>
1666<dd>
1667<p>
Junio C Hamano68cf15a2010-11-06 01:01:591668 This is especially helpful when we&#8217;re tracking a directory
Junio C Hamano43d01342006-10-12 04:07:321669 that has been moved around within the repository, or if we
1670 started tracking a branch and never tracked the trunk it was
Junio C Hamano00cb3712007-02-23 11:13:521671 descended from. This feature is enabled by default, use
1672 --no-follow-parent to disable it.
Junio C Hamano43d01342006-10-12 04:07:321673</p>
Junio C Hamano48bc1ce2009-07-09 16:49:191674<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:591675<div class="verseblock-content">config key: svn.followparent</div>
1676<div class="verseblock-attribution">
1677</div></div>
Junio C Hamano43d01342006-10-12 04:07:321678</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311679</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:521680</div>
Junio C Hamanoba4b9282008-07-06 05:20:311681<h2 id="_config_file_only_options">CONFIG FILE-ONLY OPTIONS</h2>
Junio C Hamano00cb3712007-02-23 11:13:521682<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591683<div class="dlist"><dl>
1684<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521685svn.noMetadata
1686</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591687<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521688svn-remote.&lt;name&gt;.noMetadata
Junio C Hamano43d01342006-10-12 04:07:321689</dt>
1690<dd>
1691<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191692 This gets rid of the <em>git-svn-id:</em> lines at the end of every commit.
Junio C Hamano43d01342006-10-12 04:07:321693</p>
Junio C Hamano68cf15a2010-11-06 01:01:591694<div class="paragraph"><p>This option can only be used for one-shot imports as <em>git svn</em>
Junio C Hamano657fd8a2010-10-07 00:01:241695will not be able to fetch again without metadata. Additionally,
1696if you lose your .git/svn/<strong>*/.rev_map.</strong> files, <em>git svn</em> will not
1697be able to rebuild them.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591698<div class="paragraph"><p>The <em>git svn log</em> command will not work on repositories using
Junio C Hamanoa3fd83c2007-03-02 10:34:361699this, either. Using this conflicts with the <em>useSvmProps</em>
Junio C Hamanoba4b9282008-07-06 05:20:311700option for (hopefully) obvious reasons.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591701<div class="paragraph"><p>This option is NOT recommended as it makes it difficult to track down
Junio C Hamano657fd8a2010-10-07 00:01:241702old references to SVN revision numbers in existing documentation, bug
1703reports and archives. If you plan to eventually migrate from SVN to git
1704and are certain about dropping SVN history, consider
Junio C Hamanoa28a9202012-06-21 07:08:231705<a href="git-filter-branch.html">git-filter-branch(1)</a> instead. filter-branch also allows
Junio C Hamano7165bf72011-01-04 22:06:181706reformatting of metadata for ease-of-reading and rewriting authorship
Junio C Hamano657fd8a2010-10-07 00:01:241707info for non-"svn.authorsFile" users.</p></div>
Junio C Hamano43d01342006-10-12 04:07:321708</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591709<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521710svn.useSvmProps
1711</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591712<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521713svn-remote.&lt;name&gt;.useSvmProps
Junio C Hamano9ae1a062006-07-10 08:12:341714</dt>
1715<dd>
1716<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191717 This allows <em>git svn</em> to re-map repository URLs and UUIDs from
1718 mirrors created using SVN::Mirror (or svk) for metadata.
Junio C Hamano9ae1a062006-07-10 08:12:341719</p>
Junio C Hamano68cf15a2010-11-06 01:01:591720<div class="paragraph"><p>If an SVN revision has a property, "svm:headrev", it is likely
Junio C Hamano00cb3712007-02-23 11:13:521721that the revision was created by SVN::Mirror (also used by SVK).
1722The property contains a repository UUID and a revision. We want
1723to make it look like we are mirroring the original URL, so
1724introduce a helper function that returns the original identity
1725URL and UUID, and use it when generating metadata in commit
Junio C Hamanoba4b9282008-07-06 05:20:311726messages.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341727</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591728<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521729svn.useSvnsyncProps
1730</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591731<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521732svn-remote.&lt;name&gt;.useSvnsyncprops
Junio C Hamano47c1e3c2006-09-25 04:45:551733</dt>
1734<dd>
1735<p>
Junio C Hamano00cb3712007-02-23 11:13:521736 Similar to the useSvmProps option; this is for users
1737 of the svnsync(1) command distributed with SVN 1.4.x and
1738 later.
Junio C Hamano47c1e3c2006-09-25 04:45:551739</p>
Junio C Hamano00cb3712007-02-23 11:13:521740</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591741<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521742svn-remote.&lt;name&gt;.rewriteRoot
1743</dt>
1744<dd>
1745<p>
1746 This allows users to create repositories from alternate
Junio C Hamano48bc1ce2009-07-09 16:49:191747 URLs. For example, an administrator could run <em>git svn</em> on the
Junio C Hamano00cb3712007-02-23 11:13:521748 server locally (accessing via file://) but wish to distribute
1749 the repository with a public http:// or svn:// URL in the
1750 metadata so users of it will see the public URL.
1751</p>
Junio C Hamano0538b892008-06-20 04:18:331752</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591753<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:291754svn-remote.&lt;name&gt;.rewriteUUID
1755</dt>
1756<dd>
1757<p>
1758 Similar to the useSvmProps option; this is for users who need
1759 to remap the UUID manually. This may be useful in situations
1760 where the original UUID is not available via either useSvmProps
1761 or useSvnsyncProps.
1762</p>
1763</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591764<dt class="hdlist1">
Junio C Hamanof7e049c2011-04-11 23:48:361765svn-remote.&lt;name&gt;.pushurl
1766</dt>
1767<dd>
1768<p>
1769 Similar to git&#8217;s <em>remote.&lt;name&gt;.pushurl</em>, this key is designed
1770 to be used in cases where <em>url</em> points to an SVN repository
1771 via a read-only transport, to provide an alternate read/write
1772 transport. It is assumed that both keys point to the same
1773 repository. Unlike <em>commiturl</em>, <em>pushurl</em> is a base path. If
1774 either <em>commiturl</em> or <em>pushurl</em> could be used, <em>commiturl</em>
1775 takes precedence.
1776</p>
1777</dd>
1778<dt class="hdlist1">
Junio C Hamanob3250062009-02-11 20:16:501779svn.brokenSymlinkWorkaround
1780</dt>
1781<dd>
1782<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191783 This disables potentially expensive checks to workaround
1784 broken symlinks checked into SVN by broken clients. Set this
1785 option to "false" if you track a SVN repository with many
1786 empty blobs that are not symlinks. This option may be changed
1787 while <em>git svn</em> is running and take effect on the next
1788 revision fetched. If unset, <em>git svn</em> assumes this option to
1789 be "true".
Junio C Hamanob3250062009-02-11 20:16:501790</p>
1791</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591792<dt class="hdlist1">
Junio C Hamanoa9788762010-08-03 15:15:541793svn.pathnameencoding
1794</dt>
1795<dd>
1796<p>
1797 This instructs git svn to recode pathnames to a given encoding.
1798 It can be used by windows users and by those who work in non-utf8
1799 locales to avoid corrupted file names with non-ASCII characters.
Junio C Hamano68cf15a2010-11-06 01:01:591800 Valid encodings are the ones supported by Perl&#8217;s Encode module.
Junio C Hamanoa9788762010-08-03 15:15:541801</p>
1802</dd>
Junio C Hamano209ebe82011-04-27 21:09:591803<dt class="hdlist1">
1804svn-remote.&lt;name&gt;.automkdirs
1805</dt>
1806<dd>
1807<p>
1808 Normally, the "git svn clone" and "git svn rebase" commands
1809 attempt to recreate empty directories that are in the
1810 Subversion repository. If this option is set to "false", then
1811 empty directories will only be created if the "git svn mkdirs"
1812 command is run explicitly. If unset, <em>git svn</em> assumes this
1813 option to be "true".
1814</p>
1815</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311816</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591817<div class="paragraph"><p>Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps
Junio C Hamano48bc1ce2009-07-09 16:49:191818options all affect the metadata generated and used by <em>git svn</em>; they
Junio C Hamano00cb3712007-02-23 11:13:521819<strong>must</strong> be set in the configuration file before any history is imported
Junio C Hamanoba4b9282008-07-06 05:20:311820and these settings should never be changed once they are set.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591821<div class="paragraph"><p>Additionally, only one of these options can be used per svn-remote
Junio C Hamanod0d892c2010-01-24 20:06:291822section because they affect the <em>git-svn-id:</em> metadata line, except
1823for rewriteRoot and rewriteUUID which can be used together.</p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361824</div>
Junio C Hamanoba4b9282008-07-06 05:20:311825<h2 id="_basic_examples">BASIC EXAMPLES</h2>
Junio C Hamanoa3fd83c2007-03-02 10:34:361826<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591827<div class="paragraph"><p>Tracking and contributing to the trunk of a Subversion-managed project:</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341828<div class="listingblock">
1829<div class="content">
Junio C Hamano00cb3712007-02-23 11:13:521830<pre><tt># Clone a repo (like git clone):
Junio C Hamanoa476efa2008-10-10 15:31:421831 git svn clone http://svn.example.com/project/trunk
Junio C Hamano00cb3712007-02-23 11:13:521832# Enter the newly cloned directory:
1833 cd trunk
Junio C Hamano48bc1ce2009-07-09 16:49:191834# You should be on master branch, double-check with 'git branch'
Junio C Hamano00cb3712007-02-23 11:13:521835 git branch
1836# Do some work and commit locally to git:
1837 git commit ...
1838# Something is committed to SVN, rebase your local changes against the
1839# latest changes in SVN:
Junio C Hamanofce7c7e2008-07-02 03:06:381840 git svn rebase
Junio C Hamano00cb3712007-02-23 11:13:521841# Now commit your changes (that were committed previously using git) to SVN,
1842# as well as automatically updating your working HEAD:
Junio C Hamanofce7c7e2008-07-02 03:06:381843 git svn dcommit
Junio C Hamano9ae1a062006-07-10 08:12:341844# Append svn:ignore settings to the default git exclude file:
Junio C Hamanofce7c7e2008-07-02 03:06:381845 git svn show-ignore &gt;&gt; .git/info/exclude</tt></pre>
Junio C Hamano9ae1a062006-07-10 08:12:341846</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591847<div class="paragraph"><p>Tracking and contributing to an entire Subversion-managed project
Junio C Hamanoba4b9282008-07-06 05:20:311848(complete with a trunk, tags and branches):</p></div>
Junio C Hamanoa8d072a2007-01-05 07:46:251849<div class="listingblock">
1850<div class="content">
Junio C Hamano00cb3712007-02-23 11:13:521851<pre><tt># Clone a repo (like git clone):
Junio C Hamanoa476efa2008-10-10 15:31:421852 git svn clone http://svn.example.com/project -T trunk -b branches -t tags
Junio C Hamano00cb3712007-02-23 11:13:521853# View all branches and tags you have cloned:
1854 git branch -r
Junio C Hamanoa476efa2008-10-10 15:31:421855# Create a new branch in SVN
1856 git svn branch waldo
Junio C Hamano00cb3712007-02-23 11:13:521857# Reset your master to trunk (or any other branch, replacing 'trunk'
1858# with the appropriate name):
1859 git reset --hard remotes/trunk
1860# You may only dcommit to one branch/tag/trunk at a time. The usage
Junio C Hamanoa3fd83c2007-03-02 10:34:361861# of dcommit/rebase/show-ignore should be the same as above.</tt></pre>
Junio C Hamanoa8d072a2007-01-05 07:46:251862</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591863<div class="paragraph"><p>The initial <em>git svn clone</em> can be quite time-consuming
Junio C Hamanoe9bfa9b2007-08-07 06:06:111864(especially for large Subversion repositories). If multiple
1865people (or one person with multiple machines) want to use
Junio C Hamano48bc1ce2009-07-09 16:49:191866<em>git svn</em> to interact with the same Subversion repository, you can
1867do the initial <em>git svn clone</em> to a repository on a server and
1868have each person clone that repository with <em>git clone</em>:</p></div>
Junio C Hamanoe9bfa9b2007-08-07 06:06:111869<div class="listingblock">
1870<div class="content">
1871<pre><tt># Do the initial import on a server
Junio C Hamanoa476efa2008-10-10 15:31:421872 ssh server "cd /pub &amp;&amp; git svn clone http://svn.example.com/project
Junio C Hamanof7bb6692008-01-27 08:23:461873# Clone locally - make sure the refs/remotes/ space matches the server
1874 mkdir project
1875 cd project
Junio C Hamanofce7c7e2008-07-02 03:06:381876 git init
Junio C Hamanof7bb6692008-01-27 08:23:461877 git remote add origin server:/pub/project
Junio C Hamanob218ad82011-01-08 00:21:031878 git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
Junio C Hamanof7bb6692008-01-27 08:23:461879 git fetch
Junio C Hamanob218ad82011-01-08 00:21:031880# Prevent fetch/pull from remote git server in the future,
1881# we only want to use git svn for future updates
1882 git config --remove-section remote.origin
Junio C Hamanod3452a02008-11-15 08:07:551883# Create a local branch from one of the branches just fetched
1884 git checkout -b master FETCH_HEAD
Junio C Hamano48bc1ce2009-07-09 16:49:191885# 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:421886 git svn init http://svn.example.com/project
Junio C Hamanoe9bfa9b2007-08-07 06:06:111887# Pull the latest changes from Subversion
Junio C Hamanofce7c7e2008-07-02 03:06:381888 git svn rebase</tt></pre>
Junio C Hamanoe9bfa9b2007-08-07 06:06:111889</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341890</div>
Junio C Hamanoba4b9282008-07-06 05:20:311891<h2 id="_rebase_vs_pull_merge">REBASE VS. PULL/MERGE</h2>
Junio C Hamano6b2cee12006-08-26 08:43:311892<div class="sectionbody">
Junio C Hamanof94fd6c2012-05-17 22:55:141893<div class="paragraph"><p>Prefer to use <em>git svn rebase</em> or <em>git rebase</em>, rather than
1894<em>git pull</em> or <em>git merge</em> to synchronize unintegrated commits with a <em>git svn</em>
1895branch. Doing so will keep the history of unintegrated commits linear with
1896respect to the upstream SVN repository and allow the use of the preferred
1897<em>git svn dcommit</em> subcommand to push unintegrated commits back into SVN.</p></div>
1898<div class="paragraph"><p>Originally, <em>git svn</em> recommended that developers pulled or merged from
1899the <em>git svn</em> branch. This was because the author favored
Junio C Hamanofce7c7e2008-07-02 03:06:381900<tt>git svn set-tree B</tt> to commit a single head rather than the
Junio C Hamanof94fd6c2012-05-17 22:55:141901<tt>git svn set-tree A..B</tt> notation to commit multiple commits. Use of
1902<em>git pull</em> or <em>git merge</em> with <tt>git svn set-tree A..B</tt> will cause non-linear
1903history to be flattened when committing into SVN and this can lead to merge
1904commits unexpectedly reversing previous commits in SVN.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311905</div>
Junio C Hamanob77f8192011-05-05 01:30:381906<h2 id="_merge_tracking">MERGE TRACKING</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341907<div class="sectionbody">
Junio C Hamanob77f8192011-05-05 01:30:381908<div class="paragraph"><p>While <em>git svn</em> can track
Junio C Hamanod2d9ae12007-09-19 02:27:571909copy history (including branches and tags) for repositories adopting a
1910standard layout, it cannot yet represent merge history that happened
1911inside git back upstream to SVN users. Therefore it is advised that
1912users keep history as linear as possible inside git to ease
Junio C Hamanoba4b9282008-07-06 05:20:311913compatibility with SVN (see the CAVEATS section below).</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341914</div>
Junio C Hamanoba4b9282008-07-06 05:20:311915<h2 id="_caveats">CAVEATS</h2>
Junio C Hamanobdebabb2007-08-23 00:25:091916<div class="sectionbody">
Junio C Hamanob77f8192011-05-05 01:30:381917<div class="paragraph"><p>For the sake of simplicity and interoperating with Subversion,
1918it is recommended that all <em>git svn</em> users clone, fetch and dcommit
Junio C Hamano48bc1ce2009-07-09 16:49:191919directly 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:091920operations between git repositories and branches. The recommended
1921method of exchanging code between git branches and users is
Junio C Hamano68cf15a2010-11-06 01:01:591922<em>git format-patch</em> and <em>git am</em>, or just 'dcommit&#8217;ing to the SVN repository.</p></div>
1923<div class="paragraph"><p>Running <em>git merge</em> or <em>git pull</em> is NOT recommended on a branch you
Junio C Hamanob77f8192011-05-05 01:30:381924plan to <em>dcommit</em> from because Subversion users cannot see any
Junio C Hamano68cf15a2010-11-06 01:01:591925merges you&#8217;ve made. Furthermore, if you merge or pull from a git branch
Junio C Hamanofce7c7e2008-07-02 03:06:381926that is a mirror of an SVN branch, <em>dcommit</em> may commit to the wrong
Junio C Hamanoba4b9282008-07-06 05:20:311927branch.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591928<div class="paragraph"><p>If you do merge, note the following rule: <em>git svn dcommit</em> will
Junio C Hamanoa5574462009-11-18 07:39:281929attempt to commit on top of the SVN commit named in</p></div>
1930<div class="listingblock">
1931<div class="content">
1932<pre><tt>git log --grep=^git-svn-id: --first-parent -1</tt></pre>
1933</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591934<div class="paragraph"><p>You <em>must</em> therefore ensure that the most recent commit of the branch
Junio C Hamanoa5574462009-11-18 07:39:281935you want to dcommit to is the <em>first</em> parent of the merge. Chaos will
1936ensue otherwise, especially if the first parent is an older commit on
1937the same SVN branch.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591938<div class="paragraph"><p><em>git clone</em> does not clone branches under the refs/remotes/ hierarchy or
Junio C Hamano48bc1ce2009-07-09 16:49:191939any <em>git svn</em> metadata, or config. So repositories created and managed with
1940using <em>git svn</em> should use <em>rsync</em> for cloning, if cloning is to be done
Junio C Hamanoba4b9282008-07-06 05:20:311941at all.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591942<div class="paragraph"><p>Since <em>dcommit</em> uses rebase internally, any git branches you <em>git push</em> to
Junio C Hamanofce7c7e2008-07-02 03:06:381943before <em>dcommit</em> on will require forcing an overwrite of the existing ref
Junio C Hamanobdebabb2007-08-23 00:25:091944on the remote repository. This is generally considered bad practice,
Junio C Hamanoa28a9202012-06-21 07:08:231945see the <a href="git-push.html">git-push(1)</a> documentation for details.</p></div>
1946<div class="paragraph"><p>Do not use the --amend option of <a href="git-commit.html">git-commit(1)</a> on a change you&#8217;ve
Junio C Hamanobdebabb2007-08-23 00:25:091947already dcommitted. It is considered bad practice to --amend commits
Junio C Hamano68cf15a2010-11-06 01:01:591948you&#8217;ve already pushed to a remote repository for other users, and
Junio C Hamanoba4b9282008-07-06 05:20:311949dcommit with SVN is analogous to that.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591950<div class="paragraph"><p>When using multiple --branches or --tags, <em>git svn</em> does not automatically
Junio C Hamano688eae02009-06-28 05:19:501951handle name collisions (for example, if two branches from different paths have
1952the same name, or if a branch and a tag have the same name). In these cases,
1953use <em>init</em> to set up your git repository then, before your first <em>fetch</em>, edit
1954the .git/config file so that the branches and tags are associated with
1955different name spaces. For example:</p></div>
1956<div class="literalblock">
1957<div class="content">
1958<pre><tt>branches = stable/*:refs/remotes/svn/stable/*
1959branches = debug/*:refs/remotes/svn/debug/*</tt></pre>
1960</div></div>
Junio C Hamanobdebabb2007-08-23 00:25:091961</div>
Junio C Hamanoba4b9282008-07-06 05:20:311962<h2 id="_bugs">BUGS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341963<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591964<div class="paragraph"><p>We ignore all SVN properties except svn:executable. Any unhandled
Junio C Hamanoba4b9282008-07-06 05:20:311965properties are logged to $GIT_DIR/svn/&lt;refname&gt;/unhandled.log</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591966<div class="paragraph"><p>Renamed and copied directories are not detected by git and hence not
Junio C Hamano9ae1a062006-07-10 08:12:341967tracked when committing to SVN. I do not plan on adding support for
Junio C Hamano68cf15a2010-11-06 01:01:591968this as it&#8217;s quite difficult and time-consuming to get working for all
1969the possible corner cases (git doesn&#8217;t do it, either). Committing
Junio C Hamanob77f8192011-05-05 01:30:381970renamed and copied files is fully supported if they&#8217;re similar enough
Junio C Hamanoba4b9282008-07-06 05:20:311971for git to detect them.</p></div>
Junio C Hamano00cb3712007-02-23 11:13:521972</div>
Junio C Hamanoba4b9282008-07-06 05:20:311973<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamano00cb3712007-02-23 11:13:521974<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591975<div class="paragraph"><p><em>git svn</em> stores [svn-remote] configuration information in the
Junio C Hamano00cb3712007-02-23 11:13:521976repository .git/config file. It is similar the core git
1977[remote] sections except <em>fetch</em> keys do not accept glob
1978arguments; but they are instead handled by the <em>branches</em>
1979and <em>tags</em> keys. Since some SVN repositories are oddly
1980configured with multiple projects glob expansions such those
Junio C Hamanoba4b9282008-07-06 05:20:311981listed below are allowed:</p></div>
Junio C Hamano00cb3712007-02-23 11:13:521982<div class="listingblock">
1983<div class="content">
1984<pre><tt>[svn-remote "project-a"]
1985 url = http://server.org/svn
Junio C Hamano9572e922009-04-02 06:52:031986 fetch = trunk/project-a:refs/remotes/project-a/trunk
Junio C Hamano00cb3712007-02-23 11:13:521987 branches = branches/*/project-a:refs/remotes/project-a/branches/*
Junio C Hamano9572e922009-04-02 06:52:031988 tags = tags/*/project-a:refs/remotes/project-a/tags/*</tt></pre>
Junio C Hamano00cb3712007-02-23 11:13:521989</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591990<div class="paragraph"><p>Keep in mind that the <em>*</em> (asterisk) wildcard of the local ref
1991(right of the <em>:</em>) <strong>must</strong> be the farthest right path component;
1992however the remote wildcard may be anywhere as long as it&#8217;s an
Junio C Hamanoa6387422007-08-25 03:54:271993independent path component (surrounded by <em>/</em> or EOL). This
Junio C Hamano00cb3712007-02-23 11:13:521994type of configuration is not automatically created by <em>init</em> and
Junio C Hamano48bc1ce2009-07-09 16:49:191995should be manually entered with a text-editor or using <em>git config</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591996<div class="paragraph"><p>It is also possible to fetch a subset of branches or tags by using a
Junio C Hamanod0d892c2010-01-24 20:06:291997comma-separated list of names within braces. For example:</p></div>
1998<div class="listingblock">
1999<div class="content">
2000<pre><tt>[svn-remote "huge-project"]
2001 url = http://server.org/svn
2002 fetch = trunk/src:refs/remotes/trunk
2003 branches = branches/{red,green}/src:refs/remotes/branches/*
2004 tags = tags/{1.0,2.0}/src:refs/remotes/tags/*</tt></pre>
2005</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592006<div class="paragraph"><p>Note that git-svn keeps track of the highest revision in which a branch
Junio C Hamanod0d892c2010-01-24 20:06:292007or tag has appeared. If the subset of branches or tags is changed after
2008fetching, then .git/svn/.metadata must be manually edited to remove (or
2009reset) branches-maxRev and/or tags-maxRev as appropriate.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:342010</div>
Junio C Hamanoba4b9282008-07-06 05:20:312011<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano6b2cee12006-08-26 08:43:312012<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232013<div class="paragraph"><p><a href="git-rebase.html">git-rebase(1)</a></p></div>
Junio C Hamano6b2cee12006-08-26 08:43:312014</div>
Junio C Hamano5f3d8392011-03-15 23:33:352015<h2 id="_git">GIT</h2>
Junio C Hamano9ae1a062006-07-10 08:12:342016<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232017<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:342018</div>
Junio C Hamano7bd050f2011-09-22 06:32:222019</div>
2020<div id="footnotes"><hr /></div>
Junio C Hamano9ae1a062006-07-10 08:12:342021<div id="footer">
2022<div id="footer-text">
Junio C Hamanoa1295452012-11-13 22:32:042023Last updated 2012-11-13 14:31:09 PDT
Junio C Hamano9ae1a062006-07-10 08:12:342024</div>
2025</div>
2026</body>
2027</html>