blob: b52b294c8f58bbdcc1a249b1da48b822864ecd29 [file] [log] [blame]
Junio C Hamanobbb584b2018-04-12 06:17:351<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamano9ae1a062006-07-10 08:12:342<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5<head>
Junio C Hamano9d971152012-12-19 00:43:116<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamanoa85030a2022-07-27 16:48:217<meta name="generator" content="AsciiDoc 10.2.0" />
Junio C Hamano68cf15a2010-11-06 01:01:598<title>git-svn(1)</title>
Junio C Hamano9ae1a062006-07-10 08:12:349<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:1110/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11
12/* Default font. */
13body {
14 font-family: Georgia,serif;
15}
16
17/* Title font. */
18h1, h2, h3, h4, h5, h6,
19div.title, caption.title,
20thead, p.table.header,
21#toctitle,
22#author, #revnumber, #revdate, #revremark,
23#footer {
24 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano9ae1a062006-07-10 08:12:3425}
26
27body {
28 margin: 1em 5% 1em 5%;
29}
30
Junio C Hamanoba4b9282008-07-06 05:20:3131a {
32 color: blue;
33 text-decoration: underline;
34}
35a:visited {
36 color: fuchsia;
37}
Junio C Hamano9ae1a062006-07-10 08:12:3438
39em {
40 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5941 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:3442}
43
44strong {
45 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5946 color: #083194;
Junio C Hamano9ae1a062006-07-10 08:12:3447}
48
Junio C Hamano9ae1a062006-07-10 08:12:3449h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:3451 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
54}
55
Junio C Hamanoba4b9282008-07-06 05:20:3156h1, h2, h3 {
Junio C Hamano9ae1a062006-07-10 08:12:3457 border-bottom: 2px solid silver;
58}
59h2 {
Junio C Hamano9ae1a062006-07-10 08:12:3460 padding-top: 0.5em;
61}
Junio C Hamanoba4b9282008-07-06 05:20:3162h3 {
63 float: left;
64}
65h3 + * {
66 clear: left;
67}
Junio C Hamano9d971152012-12-19 00:43:1168h5 {
69 font-size: 1.0em;
70}
Junio C Hamano9ae1a062006-07-10 08:12:3471
72div.sectionbody {
Junio C Hamano9ae1a062006-07-10 08:12:3473 margin-left: 0;
74}
75
76hr {
77 border: 1px solid silver;
78}
79
80p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
83}
84
Junio C Hamano68cf15a2010-11-06 01:01:5985ul, ol, li > p {
86 margin-top: 0;
87}
Junio C Hamano9d971152012-12-19 00:43:1188ul > li { color: #aaa; }
89ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5990
Junio C Hamanoc3f8d8f2014-09-18 19:05:5791.monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:3495 padding: 0;
96 margin: 0;
97}
Junio C Hamanoc3f8d8f2014-09-18 19:05:5798pre {
99 white-space: pre-wrap;
100}
Junio C Hamano9ae1a062006-07-10 08:12:34101
Junio C Hamano9d971152012-12-19 00:43:11102#author {
Junio C Hamano9ae1a062006-07-10 08:12:34103 color: #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:34104 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31105 font-size: 1.1em;
Junio C Hamano9ae1a062006-07-10 08:12:34106}
Junio C Hamano9d971152012-12-19 00:43:11107#email {
Junio C Hamano9ae1a062006-07-10 08:12:34108}
Junio C Hamano9d971152012-12-19 00:43:11109#revnumber, #revdate, #revremark {
Junio C Hamano9ae1a062006-07-10 08:12:34110}
111
Junio C Hamano9d971152012-12-19 00:43:11112#footer {
Junio C Hamano9ae1a062006-07-10 08:12:34113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
117}
Junio C Hamano9d971152012-12-19 00:43:11118#footer-text {
Junio C Hamano9ae1a062006-07-10 08:12:34119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9d971152012-12-19 00:43:11122#footer-badges {
Junio C Hamano9ae1a062006-07-10 08:12:34123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9d971152012-12-19 00:43:11127#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
130}
Junio C Hamano9d971152012-12-19 00:43:11131div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano9ae1a062006-07-10 08:12:34132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22134 margin-top: 1.0em;
Junio C Hamano9ae1a062006-07-10 08:12:34135 margin-bottom: 1.5em;
136}
137div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
Junio C Hamano9ae1a062006-07-10 08:12:34142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59150 color: #527bbd;
Junio C Hamano9ae1a062006-07-10 08:12:34151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
155}
156div.title + * {
157 margin-top: 0;
158}
159
160td div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content div.title:first-child {
164 margin-top: 0.0em;
165}
166div.content + div.title {
167 margin-top: 0.0em;
168}
169
170div.sidebarblock > div.content {
171 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
Junio C Hamano9ae1a062006-07-10 08:12:34174 padding: 0.5em;
175}
176
177div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
Junio C Hamano9ae1a062006-07-10 08:12:34181 padding: 0.5em;
182}
183
Junio C Hamano7bd050f2011-09-22 06:32:22184div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59187 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamano9ae1a062006-07-10 08:12:34190}
Junio C Hamano7bd050f2011-09-22 06:32:22191
Junio C Hamano68cf15a2010-11-06 01:01:59192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
Junio C Hamano9ae1a062006-07-10 08:12:34194 text-align: right;
195}
Junio C Hamano68cf15a2010-11-06 01:01:59196
Junio C Hamano9d971152012-12-19 00:43:11197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59200}
201div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
204}
205/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31206div.verseblock + div.attribution {
207 text-align: left;
208}
Junio C Hamano9ae1a062006-07-10 08:12:34209
210div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
217}
218div.admonitionblock td.content {
219 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22220 border-left: 3px solid #dddddd;
Junio C Hamano9ae1a062006-07-10 08:12:34221}
222
223div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
Junio C Hamano9ae1a062006-07-10 08:12:34226}
227
Junio C Hamano9ae1a062006-07-10 08:12:34228div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc3f8d8f2014-09-18 19:05:57229span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamano68cf15a2010-11-06 01:01:59230a.image:visited { color: white; }
Junio C Hamano9ae1a062006-07-10 08:12:34231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59239 font-style: normal;
240 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:34241}
242dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59243 margin-top: 0.1em;
Junio C Hamano9ae1a062006-07-10 08:12:34244}
245
246ul, ol {
247 list-style-position: outside;
248}
Junio C Hamano68cf15a2010-11-06 01:01:59249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
Junio C Hamano9ae1a062006-07-10 08:12:34253 list-style-type: lower-alpha;
254}
Junio C Hamano68cf15a2010-11-06 01:01:59255ol.upperalpha {
256 list-style-type: upper-alpha;
257}
258ol.lowerroman {
259 list-style-type: lower-roman;
260}
261ol.upperroman {
262 list-style-type: upper-roman;
263}
264
265div.compact ul, div.compact ol,
266div.compact p, div.compact p,
267div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
270}
Junio C Hamano9ae1a062006-07-10 08:12:34271
Junio C Hamano9ae1a062006-07-10 08:12:34272tfoot {
273 font-weight: bold;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275td > div.verse {
276 white-space: pre;
277}
Junio C Hamano68cf15a2010-11-06 01:01:59278
279div.hdlist {
Junio C Hamano9ae1a062006-07-10 08:12:34280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
Junio C Hamano68cf15a2010-11-06 01:01:59283div.hdlist tr {
284 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31285}
Junio C Hamano68cf15a2010-11-06 01:01:59286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
Junio C Hamano9ae1a062006-07-10 08:12:34290 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59291 font-style: normal;
Junio C Hamano9ae1a062006-07-10 08:12:34292 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59293 color: navy;
Junio C Hamano9ae1a062006-07-10 08:12:34294}
Junio C Hamano68cf15a2010-11-06 01:01:59295td.hdlist2 {
Junio C Hamano9ae1a062006-07-10 08:12:34296 vertical-align: top;
297}
Junio C Hamano68cf15a2010-11-06 01:01:59298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
Junio C Hamano9ae1a062006-07-10 08:12:34306
Junio C Hamano7bd050f2011-09-22 06:32:22307.footnote, .footnoteref {
308 font-size: 0.8em;
309}
310
311span.footnote, span.footnoteref {
312 vertical-align: super;
313}
314
315#footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
318}
319
320#footnotes div.footnote {
321 margin: 0 0 5px 0;
322}
323
324#footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
332}
333
Junio C Hamano9d971152012-12-19 00:43:11334div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
338}
339div.colist td img {
340 margin-top: 0.3em;
Junio C Hamano9ae1a062006-07-10 08:12:34341}
Junio C Hamanoba4b9282008-07-06 05:20:31342
Junio C Hamano9d971152012-12-19 00:43:11343@media print {
344 #footer-badges { display: none; }
345}
346
347#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22348 margin-bottom: 2.5em;
349}
350
Junio C Hamano9d971152012-12-19 00:43:11351#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31352 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
357}
358
Junio C Hamanoc3f8d8f2014-09-18 19:05:57359div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31360 margin-top: 0;
361 margin-bottom: 0;
362}
363div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
366}
367div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
370}
371div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
374}
Junio C Hamano9d971152012-12-19 00:43:11375
376span.aqua { color: aqua; }
377span.black { color: black; }
378span.blue { color: blue; }
379span.fuchsia { color: fuchsia; }
380span.gray { color: gray; }
381span.green { color: green; }
382span.lime { color: lime; }
383span.maroon { color: maroon; }
384span.navy { color: navy; }
385span.olive { color: olive; }
386span.purple { color: purple; }
387span.red { color: red; }
388span.silver { color: silver; }
389span.teal { color: teal; }
390span.white { color: white; }
391span.yellow { color: yellow; }
392
393span.aqua-background { background: aqua; }
394span.black-background { background: black; }
395span.blue-background { background: blue; }
396span.fuchsia-background { background: fuchsia; }
397span.gray-background { background: gray; }
398span.green-background { background: green; }
399span.lime-background { background: lime; }
400span.maroon-background { background: maroon; }
401span.navy-background { background: navy; }
402span.olive-background { background: olive; }
403span.purple-background { background: purple; }
404span.red-background { background: red; }
405span.silver-background { background: silver; }
406span.teal-background { background: teal; }
407span.white-background { background: white; }
408span.yellow-background { background: yellow; }
409
410span.big { font-size: 2em; }
411span.small { font-size: 0.6em; }
412
413span.underline { text-decoration: underline; }
414span.overline { text-decoration: overline; }
415span.line-through { text-decoration: line-through; }
416
Junio C Hamanoc3f8d8f2014-09-18 19:05:57417div.unbreakable { page-break-inside: avoid; }
418
Junio C Hamano9d971152012-12-19 00:43:11419
420/*
421 * xhtml11 specific
422 *
423 * */
424
425div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
428}
429div.tableblock > table {
430 border: 3px solid #527bbd;
431}
432thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
435}
436p.table {
437 margin-top: 0;
438}
Junio C Hamano725b0da2020-01-22 22:02:40439/* Because the table frame attribute is overridden by CSS in most browsers. */
Junio C Hamano9d971152012-12-19 00:43:11440div.tableblock > table[frame="void"] {
441 border-style: none;
442}
443div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
446}
447div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
450}
451
452
453/*
454 * html5 specific
455 *
456 * */
457
458table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
461}
462thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
465}
466p.tableblock {
467 margin-top: 0;
468}
469table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
475}
476th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
481}
482
483table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
486}
487table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
490}
491table.tableblock.frame-none {
492 border-style: hidden;
493}
494
495th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
497}
498th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
500}
501th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
503}
504
505th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
507}
508th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
510}
511th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
513}
514
515
516/*
517 * manpage specific
518 *
519 * */
520
521body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59528 border-style: none;
529}
Junio C Hamano9d971152012-12-19 00:43:11530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59532}
533
534@media print {
Junio C Hamano9d971152012-12-19 00:43:11535 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59536}
Junio C Hamanoc3f8d8f2014-09-18 19:05:57537
538
Junio C Hamano9ae1a062006-07-10 08:12:34539</style>
Junio C Hamano7bd050f2011-09-22 06:32:22540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamano2b153182021-12-15 21:00:31542var asciidoc = { // Namespace.
543
544/////////////////////////////////////////////////////////////////////
545// Table Of Contents generator
546/////////////////////////////////////////////////////////////////////
547
548/* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
550 *
551 * Table Of Content generator
552 * Version: 0.4
553 *
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
556 */
557
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
560
561// toclevels = 1..4.
562toc: function (toclevels) {
563
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
571 }
572 return text;
573 }
574
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
579 }
580
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
593 }
594 iterate(i);
595 }
596 }
597 }
598 iterate(el);
599 return result;
600 }
601
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
605 }
606
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
616 }
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
619 }
620
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
634 }
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
637},
638
639
640/////////////////////////////////////////////////////////////////////
641// Footnotes generator
642/////////////////////////////////////////////////////////////////////
643
644/* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
646 */
647
648footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
660 }
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
663 }
664
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
682 }
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
689 }
690 }
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
703 }
704 }
705 }
706},
707
708install: function(toclevels) {
709 var timerId;
710
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
715 }
716 }
717
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
721 }
722
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
728}
729
730}
Junio C Hamano9d971152012-12-19 00:43:11731asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22732/*]]>*/
733</script>
Junio C Hamano9ae1a062006-07-10 08:12:34734</head>
Junio C Hamano9d971152012-12-19 00:43:11735<body class="manpage">
Junio C Hamano9ae1a062006-07-10 08:12:34736<div id="header">
737<h1>
738git-svn(1) Manual Page
739</h1>
740<h2>NAME</h2>
741<div class="sectionbody">
742<p>git-svn -
Junio C Hamano076ffcc2013-02-06 05:13:21743 Bidirectional operation between a Subversion repository and Git
Junio C Hamano9ae1a062006-07-10 08:12:34744</p>
745</div>
746</div>
Junio C Hamano7bd050f2011-09-22 06:32:22747<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11748<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59749<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34750<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59751<div class="verseblock">
Junio C Hamanoc9cb5172018-06-01 07:13:44752<pre class="content"><em>git svn</em> &lt;command&gt; [&lt;options&gt;] [&lt;arguments&gt;]</pre>
Junio C Hamano9d971152012-12-19 00:43:11753<div class="attribution">
Junio C Hamano15567bc2011-07-23 00:51:59754</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:34755</div>
Junio C Hamano9d971152012-12-19 00:43:11756</div>
757<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31758<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34759<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21760<div class="paragraph"><p><em>git svn</em> is a simple conduit for changesets between Subversion and Git.
761It provides a bidirectional flow of changes between a Subversion and a Git
Junio C Hamanocb1c44f2008-08-06 06:19:33762repository.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59763<div class="paragraph"><p><em>git svn</em> can track a standard Subversion repository,
Junio C Hamano688eae02009-06-28 05:19:50764following the common "trunk/branches/tags" layout, with the --stdlayout option.
765It can also follow branches and tags in any layout with the -T/-t/-b options
766(see options to <em>init</em> below, and also the <em>clone</em> command).</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:21767<div class="paragraph"><p>Once tracking a Subversion repository (with any of the above methods), the Git
Junio C Hamano7f80ae82008-07-30 18:31:35768repository can be updated from Subversion by the <em>fetch</em> command and
Junio C Hamano076ffcc2013-02-06 05:13:21769Subversion updated from Git by the <em>dcommit</em> command.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:34770</div>
Junio C Hamano9d971152012-12-19 00:43:11771</div>
772<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31773<h2 id="_commands">COMMANDS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:34774<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59775<div class="dlist"><dl>
776<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31777<em>init</em>
Junio C Hamano9ae1a062006-07-10 08:12:34778</dt>
779<dd>
780<p>
Junio C Hamano076ffcc2013-02-06 05:13:21781 Initializes an empty Git repository with additional
Junio C Hamano48bc1ce2009-07-09 16:49:19782 metadata directories for <em>git svn</em>. The Subversion URL
Junio C Hamano00cb3712007-02-23 11:13:52783 may be specified as a command-line argument, or as full
784 URL arguments to -T/-t/-b. Optionally, the target
785 directory to operate on can be specified as a second
786 argument. Normally this command initializes the current
787 directory.
Junio C Hamano9ae1a062006-07-10 08:12:34788</p>
Junio C Hamano68cf15a2010-11-06 01:01:59789<div class="dlist"><dl>
790<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52791-T&lt;trunk_subdir&gt;
792</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59793<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52794--trunk=&lt;trunk_subdir&gt;
795</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59796<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52797-t&lt;tags_subdir&gt;
798</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59799<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52800--tags=&lt;tags_subdir&gt;
801</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59802<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52803-b&lt;branches_subdir&gt;
804</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59805<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52806--branches=&lt;branches_subdir&gt;
807</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59808<dt class="hdlist1">
Junio C Hamano377018d2007-08-23 08:41:31809-s
810</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59811<dt class="hdlist1">
Junio C Hamano377018d2007-08-23 08:41:31812--stdlayout
813</dt>
Junio C Hamano00cb3712007-02-23 11:13:52814<dd>
815<p>
816 These are optional command-line options for init. Each of
817 these flags can point to a relative repository path
Junio C Hamano688eae02009-06-28 05:19:50818 (--tags=project/tags) or a full url
819 (--tags=https://foo.org/project/tags).
820 You can specify more than one --tags and/or --branches options, in case
821 your Subversion repository places tags or branches under multiple paths.
822 The option --stdlayout is
Junio C Hamano377018d2007-08-23 08:41:31823 a shorthand way of setting trunk,tags,branches as the relative paths,
824 which is the Subversion default. If any of the other options are given
825 as well, they take precedence.
Junio C Hamano00cb3712007-02-23 11:13:52826</p>
827</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59828<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52829--no-metadata
830</dt>
831<dd>
832<p>
833 Set the <em>noMetadata</em> option in the [svn-remote] config.
Junio C Hamano657fd8a2010-10-07 00:01:24834 This option is not recommended, please read the <em>svn.noMetadata</em>
835 section of this manpage before using this option.
Junio C Hamano00cb3712007-02-23 11:13:52836</p>
837</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59838<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52839--use-svm-props
840</dt>
841<dd>
842<p>
843 Set the <em>useSvmProps</em> option in the [svn-remote] config.
844</p>
845</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59846<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52847--use-svnsync-props
848</dt>
849<dd>
850<p>
851 Set the <em>useSvnsyncProps</em> option in the [svn-remote] config.
852</p>
853</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59854<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:52855--rewrite-root=&lt;URL&gt;
856</dt>
857<dd>
858<p>
859 Set the <em>rewriteRoot</em> option in the [svn-remote] config.
860</p>
861</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59862<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:29863--rewrite-uuid=&lt;UUID&gt;
864</dt>
865<dd>
866<p>
867 Set the <em>rewriteUUID</em> option in the [svn-remote] config.
868</p>
869</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59870<dt class="hdlist1">
Junio C Hamano63c2bc92011-02-28 06:41:28871--username=&lt;user&gt;
Junio C Hamano00cb3712007-02-23 11:13:52872</dt>
873<dd>
874<p>
875 For transports that SVN handles authentication for (http,
876 https, and plain svn), specify the username. For other
Junio C Hamano1dbca522015-05-22 20:48:55877 transports (e.g. <code>svn+ssh://</code>), you must include the username in
878 the URL, e.g. <code>svn+ssh://foo@svn.bar.com/project</code>
Junio C Hamano00cb3712007-02-23 11:13:52879</p>
Junio C Hamanoa3fd83c2007-03-02 10:34:36880</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59881<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:36882--prefix=&lt;prefix&gt;
883</dt>
884<dd>
885<p>
Junio C Hamano00cb3712007-02-23 11:13:52886 This allows one to specify a prefix which is prepended
887 to the names of remotes if trunk/branches/tags are
888 specified. The prefix does not automatically include a
889 trailing slash, so be sure you include one in the
Junio C Hamano0a2ad892007-06-24 22:23:12890 argument if that is what you want. If --branches/-b is
891 specified, the prefix must include a trailing slash.
Junio C Hamanoe3cfafc2013-10-16 21:11:45892 Setting a prefix (with a trailing slash) is strongly
893 encouraged in any case, as your SVN-tracking refs will
894 then be located at "refs/remotes/$prefix/<strong>", which is
895 compatible with Git&#8217;s own remote-tracking ref layout
896 (refs/remotes/$remote/</strong>). Setting a prefix is also useful
897 if you wish to track multiple projects that share a common
898 repository.
Junio C Hamanoc1974992014-04-21 21:08:20899 By default, the prefix is set to <em>origin/</em>.
Junio C Hamanoa3fd83c2007-03-02 10:34:36900</p>
Junio C Hamanoe3cfafc2013-10-16 21:11:45901<div class="admonitionblock">
902<table><tr>
903<td class="icon">
904<div class="title">Note</div>
905</td>
Junio C Hamanoc1974992014-04-21 21:08:20906<td class="content">Before Git v2.0, the default prefix was "" (no prefix). This
907meant that SVN-tracking refs were put at "refs/remotes/*", which is
Junio C Hamano796c55f2014-05-02 21:45:15908incompatible with how Git&#8217;s own remote-tracking refs are organized.
909If you still want the old default, you can get it by passing
Junio C Hamanoc3f8d8f2014-09-18 19:05:57910<code>--prefix ""</code> on the command line (<code>--prefix=""</code> may not work if
Junio C Hamano796c55f2014-05-02 21:45:15911your Perl&#8217;s Getopt::Long is &lt; v2.37).</td>
Junio C Hamanoe3cfafc2013-10-16 21:11:45912</tr></table>
913</div>
Junio C Hamano00cb3712007-02-23 11:13:52914</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59915<dt class="hdlist1">
Junio C Hamano3a31ce52017-06-13 21:15:55916--ignore-refs=&lt;regex&gt;
917</dt>
918<dd>
919<p>
920 When passed to <em>init</em> or <em>clone</em> this regular expression will
921 be preserved as a config key. See <em>fetch</em> for a description
922 of <code>--ignore-refs</code>.
923</p>
924</dd>
925<dt class="hdlist1">
Junio C Hamano55344412009-04-12 18:31:19926--ignore-paths=&lt;regex&gt;
927</dt>
928<dd>
929<p>
930 When passed to <em>init</em> or <em>clone</em> this regular expression will
931 be preserved as a config key. See <em>fetch</em> for a description
Junio C Hamano92d80372016-07-13 22:00:05932 of <code>--ignore-paths</code>.
Junio C Hamano55344412009-04-12 18:31:19933</p>
934</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59935<dt class="hdlist1">
Junio C Hamano3670e392013-05-13 05:11:18936--include-paths=&lt;regex&gt;
937</dt>
938<dd>
939<p>
940 When passed to <em>init</em> or <em>clone</em> this regular expression will
941 be preserved as a config key. See <em>fetch</em> for a description
Junio C Hamano92d80372016-07-13 22:00:05942 of <code>--include-paths</code>.
Junio C Hamano3670e392013-05-13 05:11:18943</p>
944</dd>
945<dt class="hdlist1">
Junio C Hamanoaa2cd762009-07-26 08:14:01946--no-minimize-url
947</dt>
948<dd>
949<p>
950 When tracking multiple directories (using --stdlayout,
951 --branches, or --tags options), git svn will attempt to connect
952 to the root (or highest allowed level) of the Subversion
953 repository. This default allows better tracking of history if
954 entire projects are moved within a repository, but may cause
955 issues on repositories where read access restrictions are in
Junio C Hamano92d80372016-07-13 22:00:05956 place. Passing <code>--no-minimize-url</code> will allow git svn to
Junio C Hamanoaa2cd762009-07-26 08:14:01957 accept URLs as-is without attempting to connect to a higher
958 level directory. This option is off by default when only
959 one URL/branch is tracked (it would do little good).
960</p>
961</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31962</dl></div>
Junio C Hamano67fad6d2007-05-06 08:53:12963</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59964<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31965<em>fetch</em>
Junio C Hamano9ae1a062006-07-10 08:12:34966</dt>
967<dd>
968<p>
Junio C Hamano00cb3712007-02-23 11:13:52969 Fetch unfetched revisions from the Subversion remote we are
970 tracking. The name of the [svn-remote "&#8230;"] section in the
Junio C Hamanoe3cfafc2013-10-16 21:11:45971 $GIT_DIR/config file may be specified as an optional
972 command-line argument.
Junio C Hamano9ae1a062006-07-10 08:12:34973</p>
Junio C Hamanoe3cfafc2013-10-16 21:11:45974<div class="paragraph"><p>This automatically updates the rev_map if needed (see
975<em>$GIT_DIR/svn/**/.rev_map.*</em> in the FILES section below for details).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59976<div class="dlist"><dl>
977<dt class="hdlist1">
Junio C Hamano8f4ac0d2009-01-19 08:35:36978--localtime
979</dt>
980<dd>
981<p>
Junio C Hamanoe3acfb82013-11-12 23:22:57982 Store Git commit times in the local time zone instead of UTC. This
Junio C Hamano48bc1ce2009-07-09 16:49:19983 makes <em>git log</em> (even without --date=local) show the same times
Junio C Hamanoc3f8d8f2014-09-18 19:05:57984 that <code>svn log</code> would in the local time zone.
Junio C Hamano8f4ac0d2009-01-19 08:35:36985</p>
Junio C Hamano68cf15a2010-11-06 01:01:59986<div class="paragraph"><p>This doesn&#8217;t interfere with interoperating with the Subversion
Junio C Hamano0df868a2009-08-19 07:28:28987repository you cloned from, but if you wish for your local Git
Junio C Hamano68cf15a2010-11-06 01:01:59988repository to be able to interoperate with someone else&#8217;s local Git
989repository, either don&#8217;t use this option or you should both use it in
Junio C Hamanoe3acfb82013-11-12 23:22:57990the same local time zone.</p></div>
Junio C Hamano55344412009-04-12 18:31:19991</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59992<dt class="hdlist1">
Junio C Hamano55344412009-04-12 18:31:19993--parent
994</dt>
995<dd>
996<p>
997 Fetch only from the SVN parent of the current HEAD.
998</p>
Junio C Hamano8f4ac0d2009-01-19 08:35:36999</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591000<dt class="hdlist1">
Junio C Hamano3a31ce52017-06-13 21:15:551001--ignore-refs=&lt;regex&gt;
1002</dt>
1003<dd>
1004<p>
1005 Ignore refs for branches or tags matching the Perl regular
1006 expression. A "negative look-ahead assertion" like
1007 <code>^refs/remotes/origin/(?!tags/wanted-tag|wanted-branch).*$</code>
1008 can be used to allow only certain refs.
1009</p>
1010<div class="verseblock">
1011<pre class="content">config key: svn-remote.&lt;name&gt;.ignore-refs</pre>
1012<div class="attribution">
1013</div></div>
1014<div class="paragraph"><p>If the ignore-refs configuration key is set, and the command-line
1015option is also given, both regular expressions will be used.</p></div>
1016</dd>
1017<dt class="hdlist1">
Junio C Hamanoa07e8162009-01-26 17:36:431018--ignore-paths=&lt;regex&gt;
1019</dt>
1020<dd>
1021<p>
Junio C Hamano55344412009-04-12 18:31:191022 This allows one to specify a Perl regular expression that will
Junio C Hamanoa07e8162009-01-26 17:36:431023 cause skipping of all matching paths from checkout from SVN.
Junio C Hamano92d80372016-07-13 22:00:051024 The <code>--ignore-paths</code> option should match for every <em>fetch</em>
Junio C Hamano55344412009-04-12 18:31:191025 (including automatic fetches due to <em>clone</em>, <em>dcommit</em>,
1026 <em>rebase</em>, etc) on a given repository.
Junio C Hamanoa07e8162009-01-26 17:36:431027</p>
Junio C Hamano48bc1ce2009-07-09 16:49:191028<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111029<pre class="content">config key: svn-remote.&lt;name&gt;.ignore-paths</pre>
1030<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591031</div></div>
Junio C Hamanoe1aeb5e2014-06-06 19:16:291032<div class="paragraph"><p>If the ignore-paths configuration key is set, and the command-line
1033option is also given, both regular expressions will be used.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591034<div class="paragraph"><p>Examples:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111035<div class="openblock">
1036<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591037<div class="dlist"><dl>
1038<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191039Skip "doc*" directory for every fetch
1040</dt>
1041<dd>
Junio C Hamano48bc1ce2009-07-09 16:49:191042<div class="listingblock">
Junio C Hamano55344412009-04-12 18:31:191043<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571044<pre><code>--ignore-paths="^doc"</code></pre>
Junio C Hamanoa07e8162009-01-26 17:36:431045</div></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191046</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591047<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191048Skip "branches" and "tags" of first level directories
1049</dt>
1050<dd>
Junio C Hamano48bc1ce2009-07-09 16:49:191051<div class="listingblock">
Junio C Hamanoa07e8162009-01-26 17:36:431052<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571053<pre><code>--ignore-paths="^[^/]+/(?:branches|tags)"</code></pre>
Junio C Hamanoa07e8162009-01-26 17:36:431054</div></div>
1055</dd>
Junio C Hamano8f4ac0d2009-01-19 08:35:361056</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111057</div></div>
Junio C Hamano00cb3712007-02-23 11:13:521058</dd>
Junio C Hamanoa1295452012-11-13 22:32:041059<dt class="hdlist1">
Junio C Hamano3670e392013-05-13 05:11:181060--include-paths=&lt;regex&gt;
1061</dt>
1062<dd>
1063<p>
1064 This allows one to specify a Perl regular expression that will
1065 cause the inclusion of only matching paths from checkout from SVN.
Junio C Hamano92d80372016-07-13 22:00:051066 The <code>--include-paths</code> option should match for every <em>fetch</em>
Junio C Hamano3670e392013-05-13 05:11:181067 (including automatic fetches due to <em>clone</em>, <em>dcommit</em>,
Junio C Hamano92d80372016-07-13 22:00:051068 <em>rebase</em>, etc) on a given repository. <code>--ignore-paths</code> takes
1069 precedence over <code>--include-paths</code>.
Junio C Hamano3670e392013-05-13 05:11:181070</p>
Junio C Hamano8f2f09a2015-09-01 23:41:051071<div class="verseblock">
1072<pre class="content">config key: svn-remote.&lt;name&gt;.include-paths</pre>
1073<div class="attribution">
1074</div></div>
Junio C Hamano3670e392013-05-13 05:11:181075</dd>
1076<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041077--log-window-size=&lt;n&gt;
1078</dt>
1079<dd>
1080<p>
Junio C Hamanob1c58582013-10-30 21:55:001081 Fetch &lt;n&gt; log entries per request when scanning Subversion history.
1082 The default is 100. For very large Subversion repositories, larger
1083 values may be needed for <em>clone</em>/<em>fetch</em> to complete in reasonable
1084 time. But overly large values may lead to higher memory usage and
1085 request timeouts.
Junio C Hamanoa1295452012-11-13 22:32:041086</p>
1087</dd>
Junio C Hamano48bc1ce2009-07-09 16:49:191088</dl></div>
1089</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591090<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521091<em>clone</em>
1092</dt>
1093<dd>
1094<p>
1095 Runs <em>init</em> and <em>fetch</em>. It will automatically create a
1096 directory based on the basename of the URL passed to it;
1097 or if a second argument is passed; it will create a directory
1098 and work within that. It accepts all arguments that the
1099 <em>init</em> and <em>fetch</em> commands accept; with the exception of
Junio C Hamano92d80372016-07-13 22:00:051100 <code>--fetch-all</code> and <code>--parent</code>. After a repository is cloned,
Junio C Hamano48bc1ce2009-07-09 16:49:191101 the <em>fetch</em> command will be able to update revisions without
1102 affecting the working tree; and the <em>rebase</em> command will be
1103 able to update the working tree with the latest changes.
Junio C Hamano00cb3712007-02-23 11:13:521104</p>
Junio C Hamano7bd050f2011-09-22 06:32:221105<div class="dlist"><dl>
1106<dt class="hdlist1">
1107--preserve-empty-dirs
1108</dt>
1109<dd>
1110<p>
1111 Create a placeholder file in the local Git repository for each
1112 empty directory fetched from Subversion. This includes directories
1113 that become empty by removing all entries in the Subversion
1114 repository (but not the directory itself). The placeholder files
1115 are also tracked and removed when no longer necessary.
1116</p>
1117</dd>
1118<dt class="hdlist1">
1119--placeholder-filename=&lt;filename&gt;
1120</dt>
1121<dd>
1122<p>
1123 Set the name of placeholder files created by --preserve-empty-dirs.
1124 Default: ".gitignore"
1125</p>
1126</dd>
1127</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:521128</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591129<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521130<em>rebase</em>
1131</dt>
1132<dd>
1133<p>
1134 This fetches revisions from the SVN parent of the current HEAD
1135 and rebases the current (uncommitted to SVN) work against it.
1136</p>
Junio C Hamanoc3f8d8f2014-09-18 19:05:571137<div class="paragraph"><p>This works similarly to <code>svn update</code> or <em>git pull</em> except that
Junio C Hamano48bc1ce2009-07-09 16:49:191138it preserves linear history with <em>git rebase</em> instead of
1139<em>git merge</em> for ease of dcommitting with <em>git svn</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591140<div class="paragraph"><p>This accepts all options that <em>git svn fetch</em> and <em>git rebase</em>
Junio C Hamano92d80372016-07-13 22:00:051141accept. However, <code>--fetch-all</code> only fetches from the current
Junio C Hamanoba4b9282008-07-06 05:20:311142[svn-remote], and not all [svn-remote] definitions.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591143<div class="paragraph"><p>Like <em>git rebase</em>; this requires that the working tree be clean
Junio C Hamanoba4b9282008-07-06 05:20:311144and have no uncommitted changes.</p></div>
Junio C Hamanoe3cfafc2013-10-16 21:11:451145<div class="paragraph"><p>This automatically updates the rev_map if needed (see
1146<em>$GIT_DIR/svn/**/.rev_map.*</em> in the FILES section below for details).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591147<div class="dlist"><dl>
1148<dt class="hdlist1">
Junio C Hamano103ad7f2007-03-14 11:19:261149-l
1150</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591151<dt class="hdlist1">
Junio C Hamano103ad7f2007-03-14 11:19:261152--local
1153</dt>
1154<dd>
1155<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191156 Do not fetch remotely; only run <em>git rebase</em> against the
Junio C Hamano103ad7f2007-03-14 11:19:261157 last fetched commit from the upstream SVN.
1158</p>
1159</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311160</dl></div>
Junio C Hamano67fad6d2007-05-06 08:53:121161</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591162<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311163<em>dcommit</em>
1164</dt>
1165<dd>
1166<p>
Junio C Hamanof94fd6c2012-05-17 22:55:141167 Commit each diff from the current branch directly to the SVN
Junio C Hamano6b2cee12006-08-26 08:43:311168 repository, and then rebase or reset (depending on whether or
Junio C Hamano79770b62007-01-07 07:43:581169 not there is a diff between SVN and head). This will create
Junio C Hamano076ffcc2013-02-06 05:13:211170 a revision in SVN for each commit in Git.
Junio C Hamano6b2cee12006-08-26 08:43:311171</p>
Junio C Hamano076ffcc2013-02-06 05:13:211172<div class="paragraph"><p>When an optional Git branch name (or a Git commit object name)
Junio C Hamanof94fd6c2012-05-17 22:55:141173is specified as an argument, the subcommand works on the specified
1174branch, not on the current branch.</p></div>
1175<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:591176<div class="dlist"><dl>
1177<dt class="hdlist1">
Junio C Hamano67fad6d2007-05-06 08:53:121178--no-rebase
1179</dt>
1180<dd>
1181<p>
1182 After committing, do not rebase or reset.
1183</p>
1184</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591185<dt class="hdlist1">
Junio C Hamanofaa1e502008-08-10 03:55:581186--commit-url &lt;URL&gt;
1187</dt>
1188<dd>
1189<p>
1190 Commit to this SVN URL (the full path). This is intended to
Junio C Hamano48bc1ce2009-07-09 16:49:191191 allow existing <em>git svn</em> repositories created with one transport
Junio C Hamanoc3f8d8f2014-09-18 19:05:571192 method (e.g. <code>svn://</code> or <code>http://</code> for anonymous read) to be
Junio C Hamanofaa1e502008-08-10 03:55:581193 reused if a user is later given access to an alternate transport
Junio C Hamanoc3f8d8f2014-09-18 19:05:571194 method (e.g. <code>svn+ssh://</code> or <code>https://</code>) for commit.
Junio C Hamanofaa1e502008-08-10 03:55:581195</p>
Junio C Hamano48bc1ce2009-07-09 16:49:191196<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111197<pre class="content">config key: svn-remote.&lt;name&gt;.commiturl
1198config key: svn.commiturl (overwrites all svn-remote.&lt;name&gt;.commiturl options)</pre>
1199<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591200</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531201<div class="paragraph"><p>Note that the SVN URL of the commiturl config key includes the SVN branch.
1202If you rather want to set the commit URL for an entire SVN repository use
1203svn-remote.&lt;name&gt;.pushurl instead.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591204<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:191205discouraged.</p></div>
Junio C Hamanofaa1e502008-08-10 03:55:581206</dd>
Junio C Hamano0a901522011-04-19 22:42:051207<dt class="hdlist1">
1208--mergeinfo=&lt;mergeinfo&gt;
1209</dt>
1210<dd>
1211<p>
1212 Add the given merge information during the dcommit
Junio C Hamanoc3f8d8f2014-09-18 19:05:571213 (e.g. <code>--mergeinfo="/branches/foo:1-10"</code>). All svn server versions can
Junio C Hamano0a901522011-04-19 22:42:051214 store this information (as a property), and svn clients starting from
Junio C Hamano7bd050f2011-09-22 06:32:221215 version 1.5 can make use of it. To specify merge information from multiple
1216 branches, use a single space character between the branches
Junio C Hamanoc3f8d8f2014-09-18 19:05:571217 (<code>--mergeinfo="/branches/foo:1-10 /branches/bar:3,5-6,8"</code>)
Junio C Hamano0a901522011-04-19 22:42:051218</p>
Junio C Hamano7bd050f2011-09-22 06:32:221219<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111220<pre class="content">config key: svn.pushmergeinfo</pre>
1221<div class="attribution">
Junio C Hamano7bd050f2011-09-22 06:32:221222</div></div>
1223<div class="paragraph"><p>This option will cause git-svn to attempt to automatically populate the
1224svn:mergeinfo property in the SVN repository when possible. Currently, this can
1225only be done when dcommitting non-fast-forward merges where all parents but the
1226first have already been pushed into SVN.</p></div>
Junio C Hamano0a901522011-04-19 22:42:051227</dd>
Junio C Hamano483c5782011-10-16 20:42:221228<dt class="hdlist1">
1229--interactive
1230</dt>
1231<dd>
1232<p>
1233 Ask the user to confirm that a patch set should actually be sent to SVN.
1234 For each patch, one may answer "yes" (accept this patch), "no" (discard this
1235 patch), "all" (accept all patches), or "quit".
Junio C Hamano483c5782011-10-16 20:42:221236</p>
Junio C Hamano1dbca522015-05-22 20:48:551237<div class="paragraph"><p><em>git svn dcommit</em> returns immediately if answer is "no" or "quit", without
1238committing anything to SVN.</p></div>
Junio C Hamano483c5782011-10-16 20:42:221239</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311240</dl></div>
Junio C Hamano6b2cee12006-08-26 08:43:311241</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591242<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421243<em>branch</em>
1244</dt>
1245<dd>
1246<p>
1247 Create a branch in the SVN repository.
1248</p>
Junio C Hamano68cf15a2010-11-06 01:01:591249<div class="dlist"><dl>
1250<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421251-m
1252</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591253<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421254--message
1255</dt>
1256<dd>
1257<p>
1258 Allows to specify the commit message.
1259</p>
1260</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591261<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421262-t
1263</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591264<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421265--tag
1266</dt>
1267<dd>
1268<p>
1269 Create a tag by using the tags_subdir instead of the branches_subdir
1270 specified during git svn init.
1271</p>
1272</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591273<dt class="hdlist1">
Junio C Hamano48da7832013-05-21 00:14:341274-d&lt;path&gt;
Junio C Hamano688eae02009-06-28 05:19:501275</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591276<dt class="hdlist1">
Junio C Hamano48da7832013-05-21 00:14:341277--destination=&lt;path&gt;
Junio C Hamano688eae02009-06-28 05:19:501278</dt>
1279<dd>
1280<p>
1281 If more than one --branches (or --tags) option was given to the <em>init</em>
1282 or <em>clone</em> command, you must provide the location of the branch (or
Junio C Hamano48da7832013-05-21 00:14:341283 tag) you wish to create in the SVN repository. &lt;path&gt; specifies which
1284 path to use to create the branch or tag and should match the pattern
1285 on the left-hand side of one of the configured branches or tags
1286 refspecs. You can see these refspecs with the commands
Junio C Hamano688eae02009-06-28 05:19:501287</p>
1288<div class="literalblock">
1289<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571290<pre><code>git config --get-all svn-remote.&lt;name&gt;.branches
1291git config --get-all svn-remote.&lt;name&gt;.tags</code></pre>
Junio C Hamano688eae02009-06-28 05:19:501292</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591293<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:501294<em>init</em> (or "svn" by default).</p></div>
1295</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591296<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:291297--username
1298</dt>
1299<dd>
1300<p>
1301 Specify the SVN username to perform the commit as. This option overrides
Junio C Hamano072d22b2010-05-10 02:49:381302 the <em>username</em> configuration property.
Junio C Hamanod0d892c2010-01-24 20:06:291303</p>
1304</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591305<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:291306--commit-url
1307</dt>
1308<dd>
1309<p>
1310 Use the specified URL to connect to the destination Subversion
1311 repository. This is useful in cases where the source SVN
1312 repository is read-only. This option overrides configuration
1313 property <em>commiturl</em>.
1314</p>
1315<div class="literalblock">
1316<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571317<pre><code>git config --get-all svn-remote.&lt;name&gt;.commiturl</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:291318</div></div>
1319</dd>
Junio C Hamano48da7832013-05-21 00:14:341320<dt class="hdlist1">
1321--parents
1322</dt>
1323<dd>
1324<p>
1325 Create parent folders. This parameter is equivalent to the parameter
1326 --parents on svn cp commands and is useful for non-standard repository
1327 layouts.
1328</p>
1329</dd>
Junio C Hamanoa476efa2008-10-10 15:31:421330</dl></div>
1331</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591332<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421333<em>tag</em>
1334</dt>
1335<dd>
1336<p>
1337 Create a tag in the SVN repository. This is a shorthand for
1338 <em>branch -t</em>.
1339</p>
1340</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591341<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321342<em>log</em>
1343</dt>
1344<dd>
1345<p>
1346 This should make it easy to look up svn log messages when svn
1347 users refer to -r/--revision numbers.
1348</p>
Junio C Hamano68cf15a2010-11-06 01:01:591349<div class="paragraph"><p>The following features from &#8216;svn log&#8217; are supported:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111350<div class="openblock">
1351<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591352<div class="dlist"><dl>
1353<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191354-r &lt;n&gt;[:&lt;n&gt;]
1355</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591356<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191357--revision=&lt;n&gt;[:&lt;n&gt;]
Junio C Hamanoa3fd83c2007-03-02 10:34:361358</dt>
1359<dd>
1360<p>
1361 is supported, non-numeric args are not:
1362 HEAD, NEXT, BASE, PREV, etc &#8230;
1363</p>
Junio C Hamano43d01342006-10-12 04:07:321364</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591365<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191366-v
1367</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591368<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191369--verbose
Junio C Hamanoa3fd83c2007-03-02 10:34:361370</dt>
1371<dd>
1372<p>
Junio C Hamano68cf15a2010-11-06 01:01:591373 it&#8217;s not completely compatible with the --verbose
Junio C Hamanoa3fd83c2007-03-02 10:34:361374 output in svn log, but reasonably close.
1375</p>
1376</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591377<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361378--limit=&lt;n&gt;
1379</dt>
1380<dd>
1381<p>
Junio C Hamano68cf15a2010-11-06 01:01:591382 is NOT the same as --max-count, doesn&#8217;t count
Junio C Hamanoa3fd83c2007-03-02 10:34:361383 merged/excluded commits
1384</p>
1385</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591386<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361387--incremental
1388</dt>
1389<dd>
1390<p>
1391 supported
1392</p>
1393</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311394</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111395</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591396<div class="paragraph"><p>New features:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111397<div class="openblock">
1398<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591399<div class="dlist"><dl>
1400<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361401--show-commit
1402</dt>
1403<dd>
1404<p>
Junio C Hamano076ffcc2013-02-06 05:13:211405 shows the Git commit sha1, as well
Junio C Hamanoa3fd83c2007-03-02 10:34:361406</p>
1407</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591408<dt class="hdlist1">
Junio C Hamanoa3fd83c2007-03-02 10:34:361409--oneline
1410</dt>
1411<dd>
1412<p>
1413 our version of --pretty=oneline
1414</p>
1415</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311416</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111417</div></div>
Junio C Hamano24bc09a2008-02-28 00:27:441418<div class="admonitionblock">
1419<table><tr>
1420<td class="icon">
1421<div class="title">Note</div>
1422</td>
1423<td class="content">SVN itself only stores times in UTC and nothing else. The regular svn
1424client converts the UTC time to the local time (or based on the TZ=
1425environment). This command has the same behaviour.</td>
1426</tr></table>
1427</div>
Junio C Hamano68cf15a2010-11-06 01:01:591428<div class="paragraph"><p>Any other arguments are passed directly to <em>git log</em></p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361429</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591430<dt class="hdlist1">
Junio C Hamano9c334152008-02-12 03:18:521431<em>blame</em>
1432</dt>
1433<dd>
1434<p>
Junio C Hamanob1c58582013-10-30 21:55:001435 Show what revision and author last modified each line of a file. The
1436 output of this mode is format-compatible with the output of
1437 &#8216;svn blame&#8217; by default. Like the SVN blame command,
1438 local uncommitted changes in the working tree are ignored;
1439 the version of the file in the HEAD revision is annotated. Unknown
1440 arguments are passed directly to <em>git blame</em>.
Junio C Hamano9c334152008-02-12 03:18:521441</p>
Junio C Hamano68cf15a2010-11-06 01:01:591442<div class="dlist"><dl>
1443<dt class="hdlist1">
Junio C Hamano869bb802008-05-12 00:29:471444--git-format
1445</dt>
1446<dd>
1447<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191448 Produce output in the same format as <em>git blame</em>, but with
Junio C Hamano076ffcc2013-02-06 05:13:211449 SVN revision numbers instead of Git commit hashes. In this mode,
Junio C Hamano68cf15a2010-11-06 01:01:591450 changes that haven&#8217;t been committed to SVN (including local
Junio C Hamano869bb802008-05-12 00:29:471451 working-copy edits) are shown as revision 0.
1452</p>
1453</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311454</dl></div>
Junio C Hamano9c334152008-02-12 03:18:521455</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591456<dt class="hdlist1">
Junio C Hamano469d60e2007-04-29 18:30:341457<em>find-rev</em>
1458</dt>
1459<dd>
1460<p>
1461 When given an SVN revision number of the form <em>rN</em>, returns the
Junio C Hamano076ffcc2013-02-06 05:13:211462 corresponding Git commit hash (this can optionally be followed by a
Junio C Hamanob63afff2007-05-01 03:05:551463 tree-ish to specify which branch should be searched). When given a
1464 tree-ish, returns the corresponding SVN revision number.
Junio C Hamano469d60e2007-04-29 18:30:341465</p>
Junio C Hamano5dd5fae2013-01-18 21:06:491466<div class="dlist"><dl>
1467<dt class="hdlist1">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571468-B
1469</dt>
1470<dt class="hdlist1">
Junio C Hamano5dd5fae2013-01-18 21:06:491471--before
1472</dt>
1473<dd>
1474<p>
1475 Don&#8217;t require an exact match if given an SVN revision, instead find
1476 the commit corresponding to the state of the SVN repository (on the
1477 current branch) at the specified revision.
1478</p>
1479</dd>
1480<dt class="hdlist1">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571481-A
1482</dt>
1483<dt class="hdlist1">
Junio C Hamano5dd5fae2013-01-18 21:06:491484--after
1485</dt>
1486<dd>
1487<p>
1488 Don&#8217;t require an exact match if given an SVN revision; if there is
1489 not an exact match return the closest match searching forward in the
1490 history.
1491</p>
1492</dd>
1493</dl></div>
Junio C Hamano469d60e2007-04-29 18:30:341494</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591495<dt class="hdlist1">
Junio C Hamano4bf6dca2006-12-21 02:25:571496<em>set-tree</em>
Junio C Hamano9ae1a062006-07-10 08:12:341497</dt>
1498<dd>
1499<p>
Junio C Hamano43d01342006-10-12 04:07:321500 You should consider using <em>dcommit</em> instead of this command.
Junio C Hamano9ae1a062006-07-10 08:12:341501 Commit specified commit or tree objects to SVN. This relies on
Junio C Hamano88bf5712017-09-10 08:39:231502 your imported fetch data being up to date. This makes
Junio C Hamano9ae1a062006-07-10 08:12:341503 absolutely no attempts to do patching when committing to SVN, it
1504 simply overwrites files with those specified in the tree or
1505 commit. All merging is assumed to have taken place
Junio C Hamano48bc1ce2009-07-09 16:49:191506 independently of <em>git svn</em> functions.
Junio C Hamano9ae1a062006-07-10 08:12:341507</p>
1508</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591509<dt class="hdlist1">
Junio C Hamano47d68a52008-05-06 06:35:401510<em>create-ignore</em>
1511</dt>
1512<dd>
1513<p>
1514 Recursively finds the svn:ignore property on directories and
1515 creates matching .gitignore files. The resulting files are staged to
Junio C Hamanofeeb1be2008-05-22 00:53:351516 be committed, but are not committed. Use -r/--revision to refer to a
Junio C Hamanocb1c44f2008-08-06 06:19:331517 specific revision.
Junio C Hamano47d68a52008-05-06 06:35:401518</p>
1519</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591520<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311521<em>show-ignore</em>
Junio C Hamano9ae1a062006-07-10 08:12:341522</dt>
1523<dd>
1524<p>
1525 Recursively finds and lists the svn:ignore property on
1526 directories. The output is suitable for appending to
1527 the $GIT_DIR/info/exclude file.
1528</p>
1529</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591530<dt class="hdlist1">
Junio C Hamanoa5574462009-11-18 07:39:281531<em>mkdirs</em>
1532</dt>
1533<dd>
1534<p>
Junio C Hamano076ffcc2013-02-06 05:13:211535 Attempts to recreate empty directories that core Git cannot track
Junio C Hamanoa5574462009-11-18 07:39:281536 based on information in $GIT_DIR/svn/&lt;refname&gt;/unhandled.log files.
1537 Empty directories are automatically recreated when using
1538 "git svn clone" and "git svn rebase", so "mkdirs" is intended
1539 for use after commands like "git checkout" or "git reset".
Junio C Hamano209ebe82011-04-27 21:09:591540 (See the svn-remote.&lt;name&gt;.automkdirs config file option for
1541 more information.)
Junio C Hamanoa5574462009-11-18 07:39:281542</p>
1543</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591544<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321545<em>commit-diff</em>
1546</dt>
1547<dd>
1548<p>
1549 Commits the diff of two tree-ish arguments from the
Junio C Hamanoea1ac8d2018-07-18 20:16:481550 command-line. This command does not rely on being inside a <code>git svn
Junio C Hamanoc3f8d8f2014-09-18 19:05:571551 init</code>-ed repository. This command takes three arguments, (a) the
Junio C Hamano43d01342006-10-12 04:07:321552 original tree to diff against, (b) the new tree result, (c) the
1553 URL of the target Subversion repository. The final argument
Junio C Hamano48bc1ce2009-07-09 16:49:191554 (URL) may be omitted if you are working from a <em>git svn</em>-aware
Junio C Hamanoc3f8d8f2014-09-18 19:05:571555 repository (that has been <code>init</code>-ed with <em>git svn</em>).
Junio C Hamano23db8852006-11-09 23:35:531556 The -r&lt;revision&gt; option is required for this.
Junio C Hamano43d01342006-10-12 04:07:321557</p>
Junio C Hamanoa275c1f2017-06-19 20:10:121558<div class="paragraph"><p>The commit message is supplied either directly with the <code>-m</code> or <code>-F</code>
1559option, or indirectly from the tag or commit when the second tree-ish
1560denotes such an object, or it is requested by invoking an editor (see
1561<code>--edit</code> option below).</p></div>
1562<div class="dlist"><dl>
1563<dt class="hdlist1">
1564-m &lt;msg&gt;
1565</dt>
1566<dt class="hdlist1">
1567--message=&lt;msg&gt;
1568</dt>
1569<dd>
1570<p>
1571 Use the given <code>msg</code> as the commit message. This option
1572 disables the <code>--edit</code> option.
1573</p>
1574</dd>
1575<dt class="hdlist1">
1576-F &lt;filename&gt;
1577</dt>
1578<dt class="hdlist1">
1579--file=&lt;filename&gt;
1580</dt>
1581<dd>
1582<p>
1583 Take the commit message from the given file. This option
1584 disables the <code>--edit</code> option.
1585</p>
1586</dd>
1587</dl></div>
Junio C Hamano43d01342006-10-12 04:07:321588</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591589<dt class="hdlist1">
Junio C Hamanoa0970542007-11-23 08:43:301590<em>info</em>
1591</dt>
1592<dd>
1593<p>
1594 Shows information about a file or directory similar to what
Junio C Hamano68cf15a2010-11-06 01:01:591595 &#8216;svn info&#8217; provides. Does not currently support a -r/--revision
Junio C Hamanoa0970542007-11-23 08:43:301596 argument. Use the --url option to output only the value of the
1597 <em>URL:</em> field.
1598</p>
1599</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591600<dt class="hdlist1">
Junio C Hamanofeeb1be2008-05-22 00:53:351601<em>proplist</em>
1602</dt>
1603<dd>
1604<p>
1605 Lists the properties stored in the Subversion repository about a
1606 given file or directory. Use -r/--revision to refer to a specific
1607 Subversion revision.
1608</p>
1609</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591610<dt class="hdlist1">
Junio C Hamanofeeb1be2008-05-22 00:53:351611<em>propget</em>
1612</dt>
1613<dd>
1614<p>
1615 Gets the Subversion property given as the first argument, for a
1616 file. A specific revision can be specified with -r/--revision.
1617</p>
1618</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591619<dt class="hdlist1">
Junio C Hamano042f2142016-06-27 18:05:051620<em>propset</em>
1621</dt>
1622<dd>
1623<p>
1624 Sets the Subversion property given as the first argument, to the
1625 value given as the second argument for the file given as the
1626 third argument.
1627</p>
1628<div class="paragraph"><p>Example:</p></div>
1629<div class="listingblock">
1630<div class="content">
1631<pre><code>git svn propset svn:keywords "FreeBSD=%H" devel/py-tipper/Makefile</code></pre>
1632</div></div>
1633<div class="paragraph"><p>This will set the property <em>svn:keywords</em> to <em>FreeBSD=%H</em> for the file
1634<em>devel/py-tipper/Makefile</em>.</p></div>
1635</dd>
1636<dt class="hdlist1">
Junio C Hamanofeeb1be2008-05-22 00:53:351637<em>show-externals</em>
1638</dt>
1639<dd>
1640<p>
1641 Shows the Subversion externals. Use -r/--revision to specify a
1642 specific revision.
1643</p>
1644</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591645<dt class="hdlist1">
Junio C Hamanoaa2cd762009-07-26 08:14:011646<em>gc</em>
1647</dt>
1648<dd>
1649<p>
Junio C Hamanoe3cfafc2013-10-16 21:11:451650 Compress $GIT_DIR/svn/&lt;refname&gt;/unhandled.log files and remove
1651 $GIT_DIR/svn/&lt;refname&gt;/index files.
Junio C Hamanoaa2cd762009-07-26 08:14:011652</p>
1653</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591654<dt class="hdlist1">
Junio C Hamano688eae02009-06-28 05:19:501655<em>reset</em>
1656</dt>
1657<dd>
1658<p>
1659 Undoes the effects of <em>fetch</em> back to the specified revision.
1660 This allows you to re-<em>fetch</em> an SVN revision. Normally the
1661 contents of an SVN revision should never change and <em>reset</em>
1662 should not be necessary. However, if SVN permissions change,
1663 or if you alter your --ignore-paths option, a <em>fetch</em> may fail
1664 with "not found in commit" (file not previously visible) or
1665 "checksum mismatch" (missed a modification). If the problem
1666 file cannot be ignored forever (with --ignore-paths) the only
1667 way to repair the repo is to use <em>reset</em>.
1668</p>
Junio C Hamanoe3cfafc2013-10-16 21:11:451669<div class="paragraph"><p>Only the rev_map and refs/remotes/git-svn are changed (see
1670<em>$GIT_DIR/svn/**/.rev_map.*</em> in the FILES section below for details).
1671Follow <em>reset</em> with a <em>fetch</em> and then <em>git reset</em> or <em>git rebase</em> to
1672move local branches onto the new tree.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591673<div class="dlist"><dl>
1674<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191675-r &lt;n&gt;
1676</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591677<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191678--revision=&lt;n&gt;
Junio C Hamano688eae02009-06-28 05:19:501679</dt>
1680<dd>
1681<p>
1682 Specify the most recent revision to keep. All later revisions
1683 are discarded.
1684</p>
1685</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591686<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191687-p
1688</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591689<dt class="hdlist1">
Junio C Hamano48bc1ce2009-07-09 16:49:191690--parent
Junio C Hamano688eae02009-06-28 05:19:501691</dt>
1692<dd>
1693<p>
1694 Discard the specified revision as well, keeping the nearest
1695 parent instead.
1696</p>
1697</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591698<dt class="hdlist1">
Junio C Hamano688eae02009-06-28 05:19:501699Example:
1700</dt>
1701<dd>
1702<p>
1703Assume you have local changes in "master", but you need to refetch "r2".
1704</p>
1705<div class="listingblock">
1706<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571707<pre><code> r1---r2---r3 remotes/git-svn
Junio C Hamano688eae02009-06-28 05:19:501708 \
Junio C Hamanoc3f8d8f2014-09-18 19:05:571709 A---B master</code></pre>
Junio C Hamano688eae02009-06-28 05:19:501710</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591711<div class="paragraph"><p>Fix the ignore-paths or SVN permissions problem that caused "r2" to
Junio C Hamano688eae02009-06-28 05:19:501712be incomplete in the first place. Then:</p></div>
1713<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111714<pre class="content">git svn reset -r2 -p
1715git svn fetch</pre>
1716<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591717</div></div>
Junio C Hamano688eae02009-06-28 05:19:501718<div class="listingblock">
1719<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571720<pre><code> r1---r2'--r3' remotes/git-svn
Junio C Hamano688eae02009-06-28 05:19:501721 \
Junio C Hamanoc3f8d8f2014-09-18 19:05:571722 r2---r3---A---B master</code></pre>
Junio C Hamano688eae02009-06-28 05:19:501723</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591724<div class="paragraph"><p>Then fixup "master" with <em>git rebase</em>.
Junio C Hamano48bc1ce2009-07-09 16:49:191725Do NOT use <em>git merge</em> or your history will not be compatible with a
Junio C Hamano688eae02009-06-28 05:19:501726future <em>dcommit</em>!</p></div>
1727<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111728<pre class="content">git rebase --onto remotes/git-svn A^ master</pre>
1729<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591730</div></div>
Junio C Hamano688eae02009-06-28 05:19:501731<div class="listingblock">
1732<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571733<pre><code> r1---r2'--r3' remotes/git-svn
Junio C Hamano688eae02009-06-28 05:19:501734 \
Junio C Hamanoc3f8d8f2014-09-18 19:05:571735 A'--B' master</code></pre>
Junio C Hamano688eae02009-06-28 05:19:501736</div></div>
1737</dd>
1738</dl></div>
1739</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311740</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:341741</div>
Junio C Hamano9d971152012-12-19 00:43:111742</div>
1743<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311744<h2 id="_options">OPTIONS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341745<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591746<div class="dlist"><dl>
1747<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171748--shared[=(false|true|umask|group|all|world|everybody)]
Junio C Hamano43d01342006-10-12 04:07:321749</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591750<dt class="hdlist1">
Junio C Hamano59a32b02021-12-10 22:53:381751--template=&lt;template-directory&gt;
Junio C Hamano43d01342006-10-12 04:07:321752</dt>
1753<dd>
1754<p>
1755 Only used with the <em>init</em> command.
Junio C Hamano48bc1ce2009-07-09 16:49:191756 These are passed directly to <em>git init</em>.
Junio C Hamano43d01342006-10-12 04:07:321757</p>
1758</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591759<dt class="hdlist1">
Junio C Hamano63c2bc92011-02-28 06:41:281760-r &lt;arg&gt;
Junio C Hamano9ae1a062006-07-10 08:12:341761</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591762<dt class="hdlist1">
Junio C Hamano63c2bc92011-02-28 06:41:281763--revision &lt;arg&gt;
Junio C Hamano9ae1a062006-07-10 08:12:341764</dt>
1765<dd>
1766<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191767 Used with the <em>fetch</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:341768</p>
Junio C Hamano68cf15a2010-11-06 01:01:591769<div class="paragraph"><p>This allows revision ranges for partial/cauterized history
Junio C Hamano00cb3712007-02-23 11:13:521770to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges),
Junio C Hamanoba4b9282008-07-06 05:20:311771$NUMBER:HEAD, and BASE:$NUMBER are all supported.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591772<div class="paragraph"><p>This can allow you to make partial mirrors when running fetch;
Junio C Hamano00cb3712007-02-23 11:13:521773but is generally not recommended because history will be skipped
Junio C Hamanoba4b9282008-07-06 05:20:311774and lost.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341775</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591776<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341777-
1778</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591779<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341780--stdin
1781</dt>
1782<dd>
1783<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191784 Only used with the <em>set-tree</em> command.
Junio C Hamano9ae1a062006-07-10 08:12:341785</p>
Junio C Hamano68cf15a2010-11-06 01:01:591786<div class="paragraph"><p>Read a list of commits from stdin and commit them in reverse
Junio C Hamano9ae1a062006-07-10 08:12:341787order. Only the leading sha1 is read from each line, so
Junio C Hamano48bc1ce2009-07-09 16:49:191788<em>git rev-list --pretty=oneline</em> output can be used.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:341789</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591790<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341791--rmdir
1792</dt>
1793<dd>
1794<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191795 Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:341796</p>
Junio C Hamano68cf15a2010-11-06 01:01:591797<div class="paragraph"><p>Remove directories from the SVN tree if there are no files left
Junio C Hamano9ae1a062006-07-10 08:12:341798behind. SVN can version empty directories, and they are not
Junio C Hamano076ffcc2013-02-06 05:13:211799removed by default if there are no files left in them. Git
Junio C Hamano9ae1a062006-07-10 08:12:341800cannot version empty directories. Enabling this flag will make
Junio C Hamano076ffcc2013-02-06 05:13:211801the commit to SVN act like Git.</p></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191802<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111803<pre class="content">config key: svn.rmdir</pre>
1804<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591805</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341806</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591807<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341808-e
1809</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591810<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341811--edit
1812</dt>
1813<dd>
1814<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191815 Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:341816</p>
Junio C Hamano68cf15a2010-11-06 01:01:591817<div class="paragraph"><p>Edit the commit message before committing to SVN. This is off by
Junio C Hamano9ae1a062006-07-10 08:12:341818default for objects that are commits, and forced on when committing
Junio C Hamanoba4b9282008-07-06 05:20:311819tree objects.</p></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191820<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111821<pre class="content">config key: svn.edit</pre>
1822<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591823</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341824</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591825<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341826-l&lt;num&gt;
1827</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591828<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341829--find-copies-harder
1830</dt>
1831<dd>
1832<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191833 Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands.
Junio C Hamano9ae1a062006-07-10 08:12:341834</p>
Junio C Hamano68cf15a2010-11-06 01:01:591835<div class="paragraph"><p>They are both passed directly to <em>git diff-tree</em>; see
Junio C Hamanoa28a9202012-06-21 07:08:231836<a href="git-diff-tree.html">git-diff-tree(1)</a> for more information.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311837<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111838<pre class="content">config key: svn.l
1839config key: svn.findcopiesharder</pre>
1840<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591841</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:341842</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591843<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341844-A&lt;filename&gt;
1845</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591846<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341847--authors-file=&lt;filename&gt;
1848</dt>
1849<dd>
1850<p>
Junio C Hamanobbb584b2018-04-12 06:17:351851 Syntax is compatible with the file used by <em>git cvsimport</em> but
1852 an empty email address can be supplied with <em>&lt;&gt;</em>:
Junio C Hamano9ae1a062006-07-10 08:12:341853</p>
Junio C Hamano9ae1a062006-07-10 08:12:341854<div class="listingblock">
1855<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:571856<pre><code> loginname = Joe User &lt;user@example.com&gt;</code></pre>
Junio C Hamano9ae1a062006-07-10 08:12:341857</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591858<div class="paragraph"><p>If this option is specified and <em>git svn</em> encounters an SVN
Junio C Hamano48bc1ce2009-07-09 16:49:191859committer name that does not exist in the authors-file, <em>git svn</em>
Junio C Hamano9ae1a062006-07-10 08:12:341860will abort operation. The user will then have to add the
Junio C Hamano48bc1ce2009-07-09 16:49:191861appropriate entry. Re-running the previous <em>git svn</em> command
Junio C Hamanoba4b9282008-07-06 05:20:311862after the authors-file is modified should continue operation.</p></div>
Junio C Hamano48bc1ce2009-07-09 16:49:191863<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:111864<pre class="content">config key: svn.authorsfile</pre>
1865<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:591866</div></div>
Junio C Hamano43d01342006-10-12 04:07:321867</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591868<dt class="hdlist1">
Junio C Hamano52d5def2009-05-21 16:27:431869--authors-prog=&lt;filename&gt;
1870</dt>
1871<dd>
1872<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191873 If this option is specified, for each SVN committer name that
1874 does not exist in the authors file, the given file is executed
1875 with the committer name as the first argument. The program is
Junio C Hamanobbb584b2018-04-12 06:17:351876 expected to return a single line of the form "Name &lt;email&gt;" or
1877 "Name &lt;&gt;", which will be treated as if included in the authors
1878 file.
Junio C Hamano52d5def2009-05-21 16:27:431879</p>
Junio C Hamanobbb584b2018-04-12 06:17:351880<div class="paragraph"><p>Due to historical reasons a relative <em>filename</em> is first searched
1881relative to the current directory for <em>init</em> and <em>clone</em> and relative
1882to the root of the working tree for <em>fetch</em>. If <em>filename</em> is
1883not found, it is searched like any other command in <em>$PATH</em>.</p></div>
Junio C Hamano51b095b2016-07-28 21:57:511884<div class="verseblock">
1885<pre class="content">config key: svn.authorsProg</pre>
1886<div class="attribution">
1887</div></div>
Junio C Hamano52d5def2009-05-21 16:27:431888</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591889<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321890-q
1891</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591892<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:321893--quiet
1894</dt>
1895<dd>
1896<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191897 Make <em>git svn</em> less verbose. Specify a second time to make it
Junio C Hamano9572e922009-04-02 06:52:031898 even less verbose.
Junio C Hamano43d01342006-10-12 04:07:321899</p>
1900</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591901<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311902-m
1903</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591904<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311905--merge
1906</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591907<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311908-s&lt;strategy&gt;
1909</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591910<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311911--strategy=&lt;strategy&gt;
1912</dt>
Junio C Hamanof94fd6c2012-05-17 22:55:141913<dt class="hdlist1">
1914-p
1915</dt>
1916<dt class="hdlist1">
Junio C Hamanob3f862c2019-12-05 22:22:001917--rebase-merges
1918</dt>
Junio C Hamano6b2cee12006-08-26 08:43:311919<dd>
1920<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191921 These are only used with the <em>dcommit</em> and <em>rebase</em> commands.
Junio C Hamano6b2cee12006-08-26 08:43:311922</p>
Junio C Hamano68cf15a2010-11-06 01:01:591923<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:191924<em>git reset</em> cannot be used (see <em>dcommit</em>).</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311925</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591926<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311927-n
1928</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591929<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:311930--dry-run
1931</dt>
1932<dd>
1933<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191934 This can be used with the <em>dcommit</em>, <em>rebase</em>, <em>branch</em> and
1935 <em>tag</em> commands.
Junio C Hamano6b2cee12006-08-26 08:43:311936</p>
Junio C Hamano076ffcc2013-02-06 05:13:211937<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:311938which diffs would be committed to SVN.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591939<div class="paragraph"><p>For <em>rebase</em>, display the local branch associated with the upstream svn
Junio C Hamano9e1793f2008-06-02 07:31:161940repository associated with the current branch and the URL of svn
Junio C Hamanoba4b9282008-07-06 05:20:311941repository that will be fetched from.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591942<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:421943creating the branch or tag.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:311944</dd>
Junio C Hamano4f018922011-05-01 23:54:061945<dt class="hdlist1">
1946--use-log-author
1947</dt>
1948<dd>
1949<p>
Junio C Hamano076ffcc2013-02-06 05:13:211950 When retrieving svn commits into Git (as part of <em>fetch</em>, <em>rebase</em>, or
Junio C Hamanodf3d3cd2020-11-02 22:05:051951 <em>dcommit</em> operations), look for the first <code>From:</code> line or <code>Signed-off-by</code> trailer
Junio C Hamano4f018922011-05-01 23:54:061952 in the log message and use that as the author string.
1953</p>
Junio C Hamanob53e5882016-12-14 01:13:571954<div class="verseblock">
1955<pre class="content">config key: svn.useLogAuthor</pre>
1956<div class="attribution">
1957</div></div>
Junio C Hamano4f018922011-05-01 23:54:061958</dd>
1959<dt class="hdlist1">
1960--add-author-from
1961</dt>
1962<dd>
1963<p>
Junio C Hamanob9d9d902018-05-23 07:07:421964 When committing to svn from Git (as part of <em>set-tree</em> or <em>dcommit</em>
Junio C Hamano4f018922011-05-01 23:54:061965 operations), if the existing log message doesn&#8217;t already have a
Junio C Hamanodf3d3cd2020-11-02 22:05:051966 <code>From:</code> or <code>Signed-off-by</code> trailer, append a <code>From:</code> line based on the
Junio C Hamanoc3f8d8f2014-09-18 19:05:571967 Git commit&#8217;s author string. If you use this, then <code>--use-log-author</code>
Junio C Hamano4f018922011-05-01 23:54:061968 will retrieve a valid author string for all commits.
1969</p>
Junio C Hamanob53e5882016-12-14 01:13:571970<div class="verseblock">
1971<pre class="content">config key: svn.addAuthorFrom</pre>
1972<div class="attribution">
1973</div></div>
Junio C Hamano4f018922011-05-01 23:54:061974</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311975</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:341976</div>
Junio C Hamano9d971152012-12-19 00:43:111977</div>
1978<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311979<h2 id="_advanced_options">ADVANCED OPTIONS</h2>
Junio C Hamano9ae1a062006-07-10 08:12:341980<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591981<div class="dlist"><dl>
1982<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341983-i&lt;GIT_SVN_ID&gt;
1984</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591985<dt class="hdlist1">
Junio C Hamano9ae1a062006-07-10 08:12:341986--id &lt;GIT_SVN_ID&gt;
1987</dt>
1988<dd>
1989<p>
Junio C Hamano48bc1ce2009-07-09 16:49:191990 This sets GIT_SVN_ID (instead of using the environment). This
1991 allows the user to override the default refname to fetch from
1992 when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands
1993 no longer require this switch as an argument.
Junio C Hamano00cb3712007-02-23 11:13:521994</p>
1995</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591996<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:521997-R&lt;remote name&gt;
1998</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591999<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522000--svn-remote &lt;remote name&gt;
2001</dt>
2002<dd>
2003<p>
2004 Specify the [svn-remote "&lt;remote name&gt;"] section to use,
2005 this allows SVN multiple repositories to be tracked.
2006 Default: "svn"
Junio C Hamano9ae1a062006-07-10 08:12:342007</p>
2008</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592009<dt class="hdlist1">
Junio C Hamano43d01342006-10-12 04:07:322010--follow-parent
2011</dt>
2012<dd>
2013<p>
Junio C Hamanodb81b992012-12-21 23:49:122014 This option is only relevant if we are tracking branches (using
2015 one of the repository layout options --trunk, --tags,
2016 --branches, --stdlayout). For each tracked branch, try to find
2017 out where its revision was copied from, and set
Junio C Hamano076ffcc2013-02-06 05:13:212018 a suitable parent in the first Git commit for the branch.
Junio C Hamano68cf15a2010-11-06 01:01:592019 This is especially helpful when we&#8217;re tracking a directory
Junio C Hamanodb81b992012-12-21 23:49:122020 that has been moved around within the repository. If this
2021 feature is disabled, the branches created by <em>git svn</em> will all
2022 be linear and not share any history, meaning that there will be
2023 no information on where branches were branched off or merged.
2024 However, following long/convoluted histories can take a long
2025 time, so disabling this feature may speed up the cloning
2026 process. This feature is enabled by default, use
Junio C Hamano00cb3712007-02-23 11:13:522027 --no-follow-parent to disable it.
Junio C Hamano43d01342006-10-12 04:07:322028</p>
Junio C Hamano48bc1ce2009-07-09 16:49:192029<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:112030<pre class="content">config key: svn.followparent</pre>
2031<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:592032</div></div>
Junio C Hamano43d01342006-10-12 04:07:322033</dd>
Junio C Hamanoba4b9282008-07-06 05:20:312034</dl></div>
Junio C Hamano00cb3712007-02-23 11:13:522035</div>
Junio C Hamano9d971152012-12-19 00:43:112036</div>
2037<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312038<h2 id="_config_file_only_options">CONFIG FILE-ONLY OPTIONS</h2>
Junio C Hamano00cb3712007-02-23 11:13:522039<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592040<div class="dlist"><dl>
2041<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522042svn.noMetadata
2043</dt>
Junio C Hamano68cf15a2010-11-06 01:01:592044<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522045svn-remote.&lt;name&gt;.noMetadata
Junio C Hamano43d01342006-10-12 04:07:322046</dt>
2047<dd>
2048<p>
Junio C Hamano48bc1ce2009-07-09 16:49:192049 This gets rid of the <em>git-svn-id:</em> lines at the end of every commit.
Junio C Hamano43d01342006-10-12 04:07:322050</p>
Junio C Hamano68cf15a2010-11-06 01:01:592051<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:242052will not be able to fetch again without metadata. Additionally,
Junio C Hamanoe3cfafc2013-10-16 21:11:452053if you lose your <em>$GIT_DIR/svn/**/.rev_map.*</em> files, <em>git svn</em> will not
Junio C Hamano657fd8a2010-10-07 00:01:242054be able to rebuild them.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592055<div class="paragraph"><p>The <em>git svn log</em> command will not work on repositories using
Junio C Hamanoa3fd83c2007-03-02 10:34:362056this, either. Using this conflicts with the <em>useSvmProps</em>
Junio C Hamanoba4b9282008-07-06 05:20:312057option for (hopefully) obvious reasons.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592058<div class="paragraph"><p>This option is NOT recommended as it makes it difficult to track down
Junio C Hamano657fd8a2010-10-07 00:01:242059old references to SVN revision numbers in existing documentation, bug
Junio C Hamanoa8858312019-09-30 05:07:452060reports, and archives. If you plan to eventually migrate from SVN to
2061Git and are certain about dropping SVN history, consider
2062<a href="https://github.com/newren/git-filter-repo">git-filter-repo</a> instead.
2063filter-repo also allows reformatting of metadata for ease-of-reading
2064and rewriting authorship info for non-"svn.authorsFile" users.</p></div>
Junio C Hamano43d01342006-10-12 04:07:322065</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592066<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522067svn.useSvmProps
2068</dt>
Junio C Hamano68cf15a2010-11-06 01:01:592069<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522070svn-remote.&lt;name&gt;.useSvmProps
Junio C Hamano9ae1a062006-07-10 08:12:342071</dt>
2072<dd>
2073<p>
Junio C Hamano48bc1ce2009-07-09 16:49:192074 This allows <em>git svn</em> to re-map repository URLs and UUIDs from
2075 mirrors created using SVN::Mirror (or svk) for metadata.
Junio C Hamano9ae1a062006-07-10 08:12:342076</p>
Junio C Hamano68cf15a2010-11-06 01:01:592077<div class="paragraph"><p>If an SVN revision has a property, "svm:headrev", it is likely
Junio C Hamano00cb3712007-02-23 11:13:522078that the revision was created by SVN::Mirror (also used by SVK).
2079The property contains a repository UUID and a revision. We want
2080to make it look like we are mirroring the original URL, so
2081introduce a helper function that returns the original identity
2082URL and UUID, and use it when generating metadata in commit
Junio C Hamanoba4b9282008-07-06 05:20:312083messages.</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:342084</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592085<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522086svn.useSvnsyncProps
2087</dt>
Junio C Hamano68cf15a2010-11-06 01:01:592088<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522089svn-remote.&lt;name&gt;.useSvnsyncprops
Junio C Hamano47c1e3c2006-09-25 04:45:552090</dt>
2091<dd>
2092<p>
Junio C Hamano00cb3712007-02-23 11:13:522093 Similar to the useSvmProps option; this is for users
2094 of the svnsync(1) command distributed with SVN 1.4.x and
2095 later.
Junio C Hamano47c1e3c2006-09-25 04:45:552096</p>
Junio C Hamano00cb3712007-02-23 11:13:522097</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592098<dt class="hdlist1">
Junio C Hamano00cb3712007-02-23 11:13:522099svn-remote.&lt;name&gt;.rewriteRoot
2100</dt>
2101<dd>
2102<p>
2103 This allows users to create repositories from alternate
Junio C Hamano48bc1ce2009-07-09 16:49:192104 URLs. For example, an administrator could run <em>git svn</em> on the
Junio C Hamano00cb3712007-02-23 11:13:522105 server locally (accessing via file://) but wish to distribute
2106 the repository with a public http:// or svn:// URL in the
2107 metadata so users of it will see the public URL.
2108</p>
Junio C Hamano0538b892008-06-20 04:18:332109</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592110<dt class="hdlist1">
Junio C Hamanod0d892c2010-01-24 20:06:292111svn-remote.&lt;name&gt;.rewriteUUID
2112</dt>
2113<dd>
2114<p>
2115 Similar to the useSvmProps option; this is for users who need
2116 to remap the UUID manually. This may be useful in situations
2117 where the original UUID is not available via either useSvmProps
2118 or useSvnsyncProps.
2119</p>
2120</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592121<dt class="hdlist1">
Junio C Hamanof7e049c2011-04-11 23:48:362122svn-remote.&lt;name&gt;.pushurl
2123</dt>
2124<dd>
2125<p>
Junio C Hamano042f2142016-06-27 18:05:052126 Similar to Git&#8217;s <code>remote.&lt;name&gt;.pushurl</code>, this key is designed
Junio C Hamanof7e049c2011-04-11 23:48:362127 to be used in cases where <em>url</em> points to an SVN repository
2128 via a read-only transport, to provide an alternate read/write
2129 transport. It is assumed that both keys point to the same
2130 repository. Unlike <em>commiturl</em>, <em>pushurl</em> is a base path. If
2131 either <em>commiturl</em> or <em>pushurl</em> could be used, <em>commiturl</em>
2132 takes precedence.
2133</p>
2134</dd>
2135<dt class="hdlist1">
Junio C Hamanob3250062009-02-11 20:16:502136svn.brokenSymlinkWorkaround
2137</dt>
2138<dd>
2139<p>
Junio C Hamano48bc1ce2009-07-09 16:49:192140 This disables potentially expensive checks to workaround
2141 broken symlinks checked into SVN by broken clients. Set this
2142 option to "false" if you track a SVN repository with many
2143 empty blobs that are not symlinks. This option may be changed
2144 while <em>git svn</em> is running and take effect on the next
2145 revision fetched. If unset, <em>git svn</em> assumes this option to
2146 be "true".
Junio C Hamanob3250062009-02-11 20:16:502147</p>
2148</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592149<dt class="hdlist1">
Junio C Hamanoa9788762010-08-03 15:15:542150svn.pathnameencoding
2151</dt>
2152<dd>
2153<p>
2154 This instructs git svn to recode pathnames to a given encoding.
2155 It can be used by windows users and by those who work in non-utf8
2156 locales to avoid corrupted file names with non-ASCII characters.
Junio C Hamano68cf15a2010-11-06 01:01:592157 Valid encodings are the ones supported by Perl&#8217;s Encode module.
Junio C Hamanoa9788762010-08-03 15:15:542158</p>
2159</dd>
Junio C Hamano209ebe82011-04-27 21:09:592160<dt class="hdlist1">
2161svn-remote.&lt;name&gt;.automkdirs
2162</dt>
2163<dd>
2164<p>
2165 Normally, the "git svn clone" and "git svn rebase" commands
2166 attempt to recreate empty directories that are in the
2167 Subversion repository. If this option is set to "false", then
2168 empty directories will only be created if the "git svn mkdirs"
2169 command is run explicitly. If unset, <em>git svn</em> assumes this
2170 option to be "true".
2171</p>
2172</dd>
Junio C Hamanoba4b9282008-07-06 05:20:312173</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:592174<div class="paragraph"><p>Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps
Junio C Hamano48bc1ce2009-07-09 16:49:192175options all affect the metadata generated and used by <em>git svn</em>; they
Junio C Hamano00cb3712007-02-23 11:13:522176<strong>must</strong> be set in the configuration file before any history is imported
Junio C Hamanoba4b9282008-07-06 05:20:312177and these settings should never be changed once they are set.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592178<div class="paragraph"><p>Additionally, only one of these options can be used per svn-remote
Junio C Hamanod0d892c2010-01-24 20:06:292179section because they affect the <em>git-svn-id:</em> metadata line, except
2180for rewriteRoot and rewriteUUID which can be used together.</p></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:362181</div>
Junio C Hamano9d971152012-12-19 00:43:112182</div>
2183<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312184<h2 id="_basic_examples">BASIC EXAMPLES</h2>
Junio C Hamanoa3fd83c2007-03-02 10:34:362185<div class="sectionbody">
Junio C Hamanodb81b992012-12-21 23:49:122186<div class="paragraph"><p>Tracking and contributing to the trunk of a Subversion-managed project
2187(ignoring tags and branches):</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:342188<div class="listingblock">
2189<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572190<pre><code># Clone a repo (like git clone):
Junio C Hamanoa476efa2008-10-10 15:31:422191 git svn clone http://svn.example.com/project/trunk
Junio C Hamano00cb3712007-02-23 11:13:522192# Enter the newly cloned directory:
2193 cd trunk
Junio C Hamano48bc1ce2009-07-09 16:49:192194# You should be on master branch, double-check with 'git branch'
Junio C Hamano00cb3712007-02-23 11:13:522195 git branch
Junio C Hamano076ffcc2013-02-06 05:13:212196# Do some work and commit locally to Git:
Junio C Hamano00cb3712007-02-23 11:13:522197 git commit ...
2198# Something is committed to SVN, rebase your local changes against the
2199# latest changes in SVN:
Junio C Hamanofce7c7e2008-07-02 03:06:382200 git svn rebase
Junio C Hamano076ffcc2013-02-06 05:13:212201# Now commit your changes (that were committed previously using Git) to SVN,
Junio C Hamano00cb3712007-02-23 11:13:522202# as well as automatically updating your working HEAD:
Junio C Hamanofce7c7e2008-07-02 03:06:382203 git svn dcommit
Junio C Hamano076ffcc2013-02-06 05:13:212204# Append svn:ignore settings to the default Git exclude file:
Junio C Hamanoc3f8d8f2014-09-18 19:05:572205 git svn show-ignore &gt;&gt; .git/info/exclude</code></pre>
Junio C Hamano9ae1a062006-07-10 08:12:342206</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592207<div class="paragraph"><p>Tracking and contributing to an entire Subversion-managed project
Junio C Hamanoba4b9282008-07-06 05:20:312208(complete with a trunk, tags and branches):</p></div>
Junio C Hamanoa8d072a2007-01-05 07:46:252209<div class="listingblock">
2210<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572211<pre><code># Clone a repo with standard SVN directory layout (like git clone):
Junio C Hamanoe3cfafc2013-10-16 21:11:452212 git svn clone http://svn.example.com/project --stdlayout --prefix svn/
Junio C Hamanodb81b992012-12-21 23:49:122213# Or, if the repo uses a non-standard directory layout:
Junio C Hamanoe3cfafc2013-10-16 21:11:452214 git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/
Junio C Hamano00cb3712007-02-23 11:13:522215# View all branches and tags you have cloned:
2216 git branch -r
Junio C Hamanoa476efa2008-10-10 15:31:422217# Create a new branch in SVN
Junio C Hamanob1c58582013-10-30 21:55:002218 git svn branch waldo
Junio C Hamano00cb3712007-02-23 11:13:522219# Reset your master to trunk (or any other branch, replacing 'trunk'
2220# with the appropriate name):
Junio C Hamanoe3cfafc2013-10-16 21:11:452221 git reset --hard svn/trunk
Junio C Hamano00cb3712007-02-23 11:13:522222# You may only dcommit to one branch/tag/trunk at a time. The usage
Junio C Hamanoc3f8d8f2014-09-18 19:05:572223# of dcommit/rebase/show-ignore should be the same as above.</code></pre>
Junio C Hamanoa8d072a2007-01-05 07:46:252224</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592225<div class="paragraph"><p>The initial <em>git svn clone</em> can be quite time-consuming
Junio C Hamanoe9bfa9b2007-08-07 06:06:112226(especially for large Subversion repositories). If multiple
2227people (or one person with multiple machines) want to use
Junio C Hamano48bc1ce2009-07-09 16:49:192228<em>git svn</em> to interact with the same Subversion repository, you can
2229do the initial <em>git svn clone</em> to a repository on a server and
2230have each person clone that repository with <em>git clone</em>:</p></div>
Junio C Hamanoe9bfa9b2007-08-07 06:06:112231<div class="listingblock">
2232<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572233<pre><code># Do the initial import on a server
Junio C Hamanoe3cfafc2013-10-16 21:11:452234 ssh server "cd /pub &amp;&amp; git svn clone http://svn.example.com/project [options...]"
Junio C Hamanof7bb6692008-01-27 08:23:462235# Clone locally - make sure the refs/remotes/ space matches the server
2236 mkdir project
2237 cd project
Junio C Hamanofce7c7e2008-07-02 03:06:382238 git init
Junio C Hamanof7bb6692008-01-27 08:23:462239 git remote add origin server:/pub/project
Junio C Hamanob218ad82011-01-08 00:21:032240 git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
Junio C Hamanof7bb6692008-01-27 08:23:462241 git fetch
Junio C Hamano076ffcc2013-02-06 05:13:212242# Prevent fetch/pull from remote Git server in the future,
Junio C Hamanob218ad82011-01-08 00:21:032243# we only want to use git svn for future updates
2244 git config --remove-section remote.origin
Junio C Hamanod3452a02008-11-15 08:07:552245# Create a local branch from one of the branches just fetched
2246 git checkout -b master FETCH_HEAD
Junio C Hamanoe3cfafc2013-10-16 21:11:452247# Initialize 'git svn' locally (be sure to use the same URL and
2248# --stdlayout/-T/-b/-t/--prefix options as were used on server)
2249 git svn init http://svn.example.com/project [options...]
Junio C Hamanoe9bfa9b2007-08-07 06:06:112250# Pull the latest changes from Subversion
Junio C Hamanoc3f8d8f2014-09-18 19:05:572251 git svn rebase</code></pre>
Junio C Hamanoe9bfa9b2007-08-07 06:06:112252</div></div>
Junio C Hamano9ae1a062006-07-10 08:12:342253</div>
Junio C Hamano9d971152012-12-19 00:43:112254</div>
2255<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312256<h2 id="_rebase_vs_pull_merge">REBASE VS. PULL/MERGE</h2>
Junio C Hamano6b2cee12006-08-26 08:43:312257<div class="sectionbody">
Junio C Hamanof94fd6c2012-05-17 22:55:142258<div class="paragraph"><p>Prefer to use <em>git svn rebase</em> or <em>git rebase</em>, rather than
2259<em>git pull</em> or <em>git merge</em> to synchronize unintegrated commits with a <em>git svn</em>
2260branch. Doing so will keep the history of unintegrated commits linear with
2261respect to the upstream SVN repository and allow the use of the preferred
2262<em>git svn dcommit</em> subcommand to push unintegrated commits back into SVN.</p></div>
2263<div class="paragraph"><p>Originally, <em>git svn</em> recommended that developers pulled or merged from
2264the <em>git svn</em> branch. This was because the author favored
Junio C Hamanoc3f8d8f2014-09-18 19:05:572265<code>git svn set-tree B</code> to commit a single head rather than the
2266<code>git svn set-tree A..B</code> notation to commit multiple commits. Use of
2267<em>git pull</em> or <em>git merge</em> with <code>git svn set-tree A..B</code> will cause non-linear
Junio C Hamanof94fd6c2012-05-17 22:55:142268history to be flattened when committing into SVN and this can lead to merge
2269commits unexpectedly reversing previous commits in SVN.</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:312270</div>
Junio C Hamano9d971152012-12-19 00:43:112271</div>
2272<div class="sect1">
Junio C Hamanob77f8192011-05-05 01:30:382273<h2 id="_merge_tracking">MERGE TRACKING</h2>
Junio C Hamano9ae1a062006-07-10 08:12:342274<div class="sectionbody">
Junio C Hamanob77f8192011-05-05 01:30:382275<div class="paragraph"><p>While <em>git svn</em> can track
Junio C Hamanod2d9ae12007-09-19 02:27:572276copy history (including branches and tags) for repositories adopting a
2277standard layout, it cannot yet represent merge history that happened
2278inside git back upstream to SVN users. Therefore it is advised that
Junio C Hamano076ffcc2013-02-06 05:13:212279users keep history as linear as possible inside Git to ease
Junio C Hamanoba4b9282008-07-06 05:20:312280compatibility with SVN (see the CAVEATS section below).</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:342281</div>
Junio C Hamano9d971152012-12-19 00:43:112282</div>
2283<div class="sect1">
Junio C Hamanodb81b992012-12-21 23:49:122284<h2 id="_handling_of_svn_branches">HANDLING OF SVN BRANCHES</h2>
2285<div class="sectionbody">
2286<div class="paragraph"><p>If <em>git svn</em> is configured to fetch branches (and --follow-branches
Junio C Hamano076ffcc2013-02-06 05:13:212287is in effect), it sometimes creates multiple Git branches for one
Junio C Hamanoa080bc32013-04-12 21:33:012288SVN branch, where the additional branches have names of the form
Junio C Hamanodb81b992012-12-21 23:49:122289<em>branchname@nnn</em> (with nnn an SVN revision number). These additional
2290branches are created if <em>git svn</em> cannot find a parent commit for the
2291first commit in an SVN branch, to connect the branch to the history of
2292the other branches.</p></div>
2293<div class="paragraph"><p>Normally, the first commit in an SVN branch consists
2294of a copy operation. <em>git svn</em> will read this commit to get the SVN
2295revision the branch was created from. It will then try to find the
Junio C Hamano076ffcc2013-02-06 05:13:212296Git commit that corresponds to this SVN revision, and use that as the
Junio C Hamanodb81b992012-12-21 23:49:122297parent of the branch. However, it is possible that there is no suitable
Junio C Hamano076ffcc2013-02-06 05:13:212298Git commit to serve as parent. This will happen, among other reasons,
Junio C Hamanodb81b992012-12-21 23:49:122299if the SVN branch is a copy of a revision that was not fetched by <em>git
2300svn</em> (e.g. because it is an old revision that was skipped with
Junio C Hamano92d80372016-07-13 22:00:052301<code>--revision</code>), or if in SVN a directory was copied that is not tracked
Junio C Hamanodb81b992012-12-21 23:49:122302by <em>git svn</em> (such as a branch that is not tracked at all, or a
2303subdirectory of a tracked branch). In these cases, <em>git svn</em> will still
Junio C Hamano076ffcc2013-02-06 05:13:212304create a Git branch, but instead of using an existing Git commit as the
Junio C Hamanodb81b992012-12-21 23:49:122305parent of the branch, it will read the SVN history of the directory the
Junio C Hamano076ffcc2013-02-06 05:13:212306branch was copied from and create appropriate Git commits. This is
Junio C Hamanodb81b992012-12-21 23:49:122307indicated by the message "Initializing parent: &lt;branchname&gt;".</p></div>
2308<div class="paragraph"><p>Additionally, it will create a special branch named
2309<em>&lt;branchname&gt;@&lt;SVN-Revision&gt;</em>, where &lt;SVN-Revision&gt; is the SVN revision
2310number the branch was copied from. This branch will point to the newly
2311created parent commit of the branch. If in SVN the branch was deleted
2312and later recreated from a different version, there will be multiple
2313such branches with an <em>@</em>.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:212314<div class="paragraph"><p>Note that this may mean that multiple Git commits are created for a
Junio C Hamanodb81b992012-12-21 23:49:122315single SVN revision.</p></div>
2316<div class="paragraph"><p>An example: in an SVN repository with a standard
2317trunk/tags/branches layout, a directory trunk/sub is created in r.100.
2318In r.200, trunk/sub is branched by copying it to branches/. <em>git svn
Junio C Hamano076ffcc2013-02-06 05:13:212319clone -s</em> will then create a branch <em>sub</em>. It will also create new Git
Junio C Hamanodb81b992012-12-21 23:49:122320commits for r.100 through r.199 and use these as the history of branch
Junio C Hamano076ffcc2013-02-06 05:13:212321<em>sub</em>. Thus there will be two Git commits for each revision from r.100
Junio C Hamanodb81b992012-12-21 23:49:122322to r.199 (one containing trunk/, one containing trunk/sub/). Finally,
2323it will create a branch <em>sub@200</em> pointing to the new parent commit of
2324branch <em>sub</em> (i.e. the commit for r.200 and trunk/sub/).</p></div>
2325</div>
2326</div>
2327<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312328<h2 id="_caveats">CAVEATS</h2>
Junio C Hamanobdebabb2007-08-23 00:25:092329<div class="sectionbody">
Junio C Hamanob77f8192011-05-05 01:30:382330<div class="paragraph"><p>For the sake of simplicity and interoperating with Subversion,
2331it is recommended that all <em>git svn</em> users clone, fetch and dcommit
Junio C Hamano48bc1ce2009-07-09 16:49:192332directly from the SVN server, and avoid all <em>git clone</em>/<em>pull</em>/<em>merge</em>/<em>push</em>
Junio C Hamano076ffcc2013-02-06 05:13:212333operations between Git repositories and branches. The recommended
2334method of exchanging code between Git branches and users is
Junio C Hamano68cf15a2010-11-06 01:01:592335<em>git format-patch</em> and <em>git am</em>, or just 'dcommit&#8217;ing to the SVN repository.</p></div>
2336<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:382337plan to <em>dcommit</em> from because Subversion users cannot see any
Junio C Hamano076ffcc2013-02-06 05:13:212338merges you&#8217;ve made. Furthermore, if you merge or pull from a Git branch
Junio C Hamanofce7c7e2008-07-02 03:06:382339that is a mirror of an SVN branch, <em>dcommit</em> may commit to the wrong
Junio C Hamanoba4b9282008-07-06 05:20:312340branch.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592341<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:282342attempt to commit on top of the SVN commit named in</p></div>
2343<div class="listingblock">
2344<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572345<pre><code>git log --grep=^git-svn-id: --first-parent -1</code></pre>
Junio C Hamanoa5574462009-11-18 07:39:282346</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592347<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:282348you want to dcommit to is the <em>first</em> parent of the merge. Chaos will
2349ensue otherwise, especially if the first parent is an older commit on
2350the same SVN branch.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592351<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:192352any <em>git svn</em> metadata, or config. So repositories created and managed with
2353using <em>git svn</em> should use <em>rsync</em> for cloning, if cloning is to be done
Junio C Hamanoba4b9282008-07-06 05:20:312354at all.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:212355<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:382356before <em>dcommit</em> on will require forcing an overwrite of the existing ref
Junio C Hamanobdebabb2007-08-23 00:25:092357on the remote repository. This is generally considered bad practice,
Junio C Hamanoa28a9202012-06-21 07:08:232358see the <a href="git-push.html">git-push(1)</a> documentation for details.</p></div>
2359<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:092360already dcommitted. It is considered bad practice to --amend commits
Junio C Hamano68cf15a2010-11-06 01:01:592361you&#8217;ve already pushed to a remote repository for other users, and
Junio C Hamanoba4b9282008-07-06 05:20:312362dcommit with SVN is analogous to that.</p></div>
Junio C Hamanodb81b992012-12-21 23:49:122363<div class="paragraph"><p>When cloning an SVN repository, if none of the options for describing
2364the repository layout is used (--trunk, --tags, --branches,
Junio C Hamano076ffcc2013-02-06 05:13:212365--stdlayout), <em>git svn clone</em> will create a Git repository with
Junio C Hamanodb81b992012-12-21 23:49:122366completely linear history, where branches and tags appear as separate
2367directories in the working copy. While this is the easiest way to get a
2368copy of a complete repository, for projects with many branches it will
2369lead to a working copy many times larger than just the trunk. Thus for
2370projects using the standard directory structure (trunk/branches/tags),
Junio C Hamano92d80372016-07-13 22:00:052371it is recommended to clone with option <code>--stdlayout</code>. If the project
Junio C Hamanodb81b992012-12-21 23:49:122372uses a non-standard structure, and/or if branches and tags are not
2373required, it is easiest to only clone one directory (typically trunk),
2374without giving any repository layout options. If the full history with
Junio C Hamano92d80372016-07-13 22:00:052375branches and tags is required, the options <code>--trunk</code> / <code>--branches</code> /
2376<code>--tags</code> must be used.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592377<div class="paragraph"><p>When using multiple --branches or --tags, <em>git svn</em> does not automatically
Junio C Hamano688eae02009-06-28 05:19:502378handle name collisions (for example, if two branches from different paths have
2379the same name, or if a branch and a tag have the same name). In these cases,
Junio C Hamano076ffcc2013-02-06 05:13:212380use <em>init</em> to set up your Git repository then, before your first <em>fetch</em>, edit
Junio C Hamanoe3cfafc2013-10-16 21:11:452381the $GIT_DIR/config file so that the branches and tags are associated
2382with different name spaces. For example:</p></div>
Junio C Hamano688eae02009-06-28 05:19:502383<div class="literalblock">
2384<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572385<pre><code>branches = stable/*:refs/remotes/svn/stable/*
2386branches = debug/*:refs/remotes/svn/debug/*</code></pre>
Junio C Hamano688eae02009-06-28 05:19:502387</div></div>
Junio C Hamanobdebabb2007-08-23 00:25:092388</div>
Junio C Hamano9d971152012-12-19 00:43:112389</div>
2390<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312391<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamano00cb3712007-02-23 11:13:522392<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592393<div class="paragraph"><p><em>git svn</em> stores [svn-remote] configuration information in the
Junio C Hamanoe3cfafc2013-10-16 21:11:452394repository $GIT_DIR/config file. It is similar the core Git
Junio C Hamano00cb3712007-02-23 11:13:522395[remote] sections except <em>fetch</em> keys do not accept glob
2396arguments; but they are instead handled by the <em>branches</em>
2397and <em>tags</em> keys. Since some SVN repositories are oddly
2398configured with multiple projects glob expansions such those
Junio C Hamanoba4b9282008-07-06 05:20:312399listed below are allowed:</p></div>
Junio C Hamano00cb3712007-02-23 11:13:522400<div class="listingblock">
2401<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572402<pre><code>[svn-remote "project-a"]
Junio C Hamano00cb3712007-02-23 11:13:522403 url = http://server.org/svn
Junio C Hamano9572e922009-04-02 06:52:032404 fetch = trunk/project-a:refs/remotes/project-a/trunk
Junio C Hamano00cb3712007-02-23 11:13:522405 branches = branches/*/project-a:refs/remotes/project-a/branches/*
Junio C Hamano8f7d6232016-03-16 22:00:582406 branches = branches/release_*:refs/remotes/project-a/branches/release_*
2407 branches = branches/re*se:refs/remotes/project-a/branches/*
Junio C Hamanoc3f8d8f2014-09-18 19:05:572408 tags = tags/*/project-a:refs/remotes/project-a/tags/*</code></pre>
Junio C Hamano00cb3712007-02-23 11:13:522409</div></div>
Junio C Hamanod1063b12019-05-08 17:18:072410<div class="paragraph"><p>Keep in mind that the <code>*</code> (asterisk) wildcard of the local ref
2411(right of the <code>:</code>) <strong>must</strong> be the farthest right path component;
Junio C Hamano68cf15a2010-11-06 01:01:592412however the remote wildcard may be anywhere as long as it&#8217;s an
Junio C Hamanod1063b12019-05-08 17:18:072413independent path component (surrounded by <code>/</code> or EOL). This
Junio C Hamano00cb3712007-02-23 11:13:522414type of configuration is not automatically created by <em>init</em> and
Junio C Hamano48bc1ce2009-07-09 16:49:192415should be manually entered with a text-editor or using <em>git config</em>.</p></div>
Junio C Hamano8f7d6232016-03-16 22:00:582416<div class="paragraph"><p>Also note that only one asterisk is allowed per word. For example:</p></div>
2417<div class="literalblock">
2418<div class="content">
2419<pre><code>branches = branches/re*se:refs/remotes/project-a/branches/*</code></pre>
2420</div></div>
2421<div class="paragraph"><p>will match branches <em>release</em>, <em>rese</em>, <em>re123se</em>, however</p></div>
2422<div class="literalblock">
2423<div class="content">
2424<pre><code>branches = branches/re*s*e:refs/remotes/project-a/branches/*</code></pre>
2425</div></div>
2426<div class="paragraph"><p>will produce an error.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592427<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:292428comma-separated list of names within braces. For example:</p></div>
2429<div class="listingblock">
2430<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572431<pre><code>[svn-remote "huge-project"]
Junio C Hamanod0d892c2010-01-24 20:06:292432 url = http://server.org/svn
2433 fetch = trunk/src:refs/remotes/trunk
Junio C Hamanoe3cfafc2013-10-16 21:11:452434 branches = branches/{red,green}/src:refs/remotes/project-a/branches/*
Junio C Hamanoc3f8d8f2014-09-18 19:05:572435 tags = tags/{1.0,2.0}/src:refs/remotes/project-a/tags/*</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:292436</div></div>
Junio C Hamano48da7832013-05-21 00:14:342437<div class="paragraph"><p>Multiple fetch, branches, and tags keys are supported:</p></div>
2438<div class="listingblock">
2439<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572440<pre><code>[svn-remote "messy-repo"]
Junio C Hamano48da7832013-05-21 00:14:342441 url = http://server.org/svn
2442 fetch = trunk/project-a:refs/remotes/project-a/trunk
2443 fetch = branches/demos/june-project-a-demo:refs/remotes/project-a/demos/june-demo
2444 branches = branches/server/*:refs/remotes/project-a/branches/*
2445 branches = branches/demos/2011/*:refs/remotes/project-a/2011-demos/*
Junio C Hamanoc3f8d8f2014-09-18 19:05:572446 tags = tags/server/*:refs/remotes/project-a/tags/*</code></pre>
Junio C Hamano48da7832013-05-21 00:14:342447</div></div>
2448<div class="paragraph"><p>Creating a branch in such a configuration requires disambiguating which
2449location to use using the -d or --destination flag:</p></div>
2450<div class="listingblock">
2451<div class="content">
Junio C Hamanoc3f8d8f2014-09-18 19:05:572452<pre><code>$ git svn branch -d branches/server release-2-3-0</code></pre>
Junio C Hamano48da7832013-05-21 00:14:342453</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592454<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:292455or tag has appeared. If the subset of branches or tags is changed after
Junio C Hamanoe3cfafc2013-10-16 21:11:452456fetching, then $GIT_DIR/svn/.metadata must be manually edited to remove
2457(or reset) branches-maxRev and/or tags-maxRev as appropriate.</p></div>
2458</div>
2459</div>
2460<div class="sect1">
2461<h2 id="_files">FILES</h2>
2462<div class="sectionbody">
2463<div class="dlist"><dl>
2464<dt class="hdlist1">
2465$GIT_DIR/svn/**/.rev_map.*
2466</dt>
2467<dd>
2468<p>
2469 Mapping between Subversion revision numbers and Git commit
2470 names. In a repository where the noMetadata option is not set,
2471 this can be rebuilt from the git-svn-id: lines that are at the
2472 end of every commit (see the <em>svn.noMetadata</em> section above for
2473 details).
2474</p>
2475<div class="paragraph"><p><em>git svn fetch</em> and <em>git svn rebase</em> automatically update the rev_map
2476if it is missing or not up to date. <em>git svn reset</em> automatically
2477rewinds it.</p></div>
2478</dd>
2479</dl></div>
Junio C Hamano9ae1a062006-07-10 08:12:342480</div>
Junio C Hamano9d971152012-12-19 00:43:112481</div>
2482<div class="sect1">
Junio C Hamanobe601db2021-05-07 04:20:282483<h2 id="_bugs">BUGS</h2>
2484<div class="sectionbody">
2485<div class="paragraph"><p>We ignore all SVN properties except svn:executable. Any unhandled
2486properties are logged to $GIT_DIR/svn/&lt;refname&gt;/unhandled.log</p></div>
2487<div class="paragraph"><p>Renamed and copied directories are not detected by Git and hence not
2488tracked when committing to SVN. I do not plan on adding support for
2489this as it&#8217;s quite difficult and time-consuming to get working for all
2490the possible corner cases (Git doesn&#8217;t do it, either). Committing
2491renamed and copied files is fully supported if they&#8217;re similar enough
2492for Git to detect them.</p></div>
2493<div class="paragraph"><p>In SVN, it is possible (though discouraged) to commit changes to a tag
2494(because a tag is just a directory copy, thus technically the same as a
2495branch). When cloning an SVN repository, <em>git svn</em> cannot know if such a
2496commit to a tag will happen in the future. Thus it acts conservatively
2497and imports all SVN tags as branches, prefixing the tag name with <em>tags/</em>.</p></div>
2498</div>
2499</div>
2500<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312501<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano6b2cee12006-08-26 08:43:312502<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232503<div class="paragraph"><p><a href="git-rebase.html">git-rebase(1)</a></p></div>
Junio C Hamano6b2cee12006-08-26 08:43:312504</div>
Junio C Hamano9d971152012-12-19 00:43:112505</div>
2506<div class="sect1">
Junio C Hamano5f3d8392011-03-15 23:33:352507<h2 id="_git">GIT</h2>
Junio C Hamano9ae1a062006-07-10 08:12:342508<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232509<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano9ae1a062006-07-10 08:12:342510</div>
Junio C Hamano7bd050f2011-09-22 06:32:222511</div>
Junio C Hamano9d971152012-12-19 00:43:112512</div>
Junio C Hamano7bd050f2011-09-22 06:32:222513<div id="footnotes"><hr /></div>
Junio C Hamano9ae1a062006-07-10 08:12:342514<div id="footer">
2515<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:532516Last updated
Junio C Hamano918a6972023-10-29 23:44:112517 2021-12-11 07:52:02 JST
Junio C Hamano9ae1a062006-07-10 08:12:342518</div>
2519</div>
2520</body>
2521</html>