]>
Commit | Line | Data |
---|---|---|
3397f9df EW |
1 | git-svn(1) |
2 | ========== | |
3 | ||
4 | NAME | |
5 | ---- | |
c3f0baac | 6 | git-svn - Bidirectional operation between a single Subversion branch and git |
3397f9df EW |
7 | |
8 | SYNOPSIS | |
9 | -------- | |
10 | 'git-svn' <command> [options] [arguments] | |
11 | ||
12 | DESCRIPTION | |
13 | ----------- | |
0d313b2b EW |
14 | git-svn is a simple conduit for changesets between Subversion and git. |
15 | It is not to be confused with gitlink:git-svnimport[1], which is | |
a836a0e1 | 16 | read-only. |
3397f9df | 17 | |
0d313b2b | 18 | git-svn was originally designed for an individual developer who wants a |
3397f9df | 19 | bidirectional flow of changesets between a single branch in Subversion |
0d313b2b EW |
20 | and an arbitrary number of branches in git. Since its inception, |
21 | git-svn has gained the ability to track multiple branches in a manner | |
a836a0e1 | 22 | similar to git-svnimport. |
3397f9df | 23 | |
0d313b2b EW |
24 | git-svn is especially useful when it comes to tracking repositories |
25 | not organized in the way Subversion developers recommend (trunk, | |
26 | branches, tags directories). | |
3397f9df EW |
27 | |
28 | COMMANDS | |
29 | -------- | |
0ea4d4c9 JF |
30 | -- |
31 | ||
32 | 'init':: | |
a836a0e1 EW |
33 | Initializes an empty git repository with additional |
34 | metadata directories for git-svn. The Subversion URL | |
35 | may be specified as a command-line argument, or as full | |
36 | URL arguments to -T/-t/-b. Optionally, the target | |
37 | directory to operate on can be specified as a second | |
38 | argument. Normally this command initializes the current | |
39 | directory. | |
3397f9df | 40 | |
cc1793e2 KW |
41 | -T<trunk_subdir>;; |
42 | --trunk=<trunk_subdir>;; | |
43 | -t<tags_subdir>;; | |
44 | --tags=<tags_subdir>;; | |
45 | -b<branches_subdir>;; | |
46 | --branches=<branches_subdir>;; | |
a836a0e1 EW |
47 | These are optional command-line options for init. Each of |
48 | these flags can point to a relative repository path | |
49 | (--tags=project/tags') or a full url | |
50 | (--tags=https://foo.org/project/tags) | |
cc1793e2 | 51 | --no-metadata;; |
0dfaf0a4 | 52 | Set the 'noMetadata' option in the [svn-remote] config. |
cc1793e2 | 53 | --use-svm-props;; |
0dfaf0a4 | 54 | Set the 'useSvmProps' option in the [svn-remote] config. |
cc1793e2 | 55 | --use-svnsync-props;; |
0dfaf0a4 | 56 | Set the 'useSvnsyncProps' option in the [svn-remote] config. |
cc1793e2 | 57 | --rewrite-root=<URL>;; |
0dfaf0a4 | 58 | Set the 'rewriteRoot' option in the [svn-remote] config. |
cc1793e2 | 59 | --username=<USER>;; |
a0d7fe3f SV |
60 | For transports that SVN handles authentication for (http, |
61 | https, and plain svn), specify the username. For other | |
62 | transports (eg svn+ssh://), you must include the username in | |
63 | the URL, eg svn+ssh://foo@svn.bar.com/project | |
cc1793e2 | 64 | --prefix=<prefix>;; |
a836a0e1 EW |
65 | This allows one to specify a prefix which is prepended |
66 | to the names of remotes if trunk/branches/tags are | |
67 | specified. The prefix does not automatically include a | |
68 | trailing slash, so be sure you include one in the | |
0d351e9c GP |
69 | argument if that is what you want. If --branches/-b is |
70 | specified, the prefix must include a trailing slash. | |
71 | Setting a prefix is useful if you wish to track multiple | |
72 | projects that share a common repository. | |
81c5a0e6 | 73 | |
a836a0e1 | 74 | 'fetch':: |
a836a0e1 EW |
75 | Fetch unfetched revisions from the Subversion remote we are |
76 | tracking. The name of the [svn-remote "..."] section in the | |
77 | .git/config file may be specified as an optional command-line | |
78 | argument. | |
b705ba43 | 79 | |
a81ed0b6 EW |
80 | 'clone':: |
81 | Runs 'init' and 'fetch'. It will automatically create a | |
82 | directory based on the basename of the URL passed to it; | |
83 | or if a second argument is passed; it will create a directory | |
84 | and work within that. It accepts all arguments that the | |
85 | 'init' and 'fetch' commands accept; with the exception of | |
86 | '--fetch-all'. After a repository is cloned, the 'fetch' | |
87 | command will be able to update revisions without affecting | |
88 | the working tree; and the 'rebase' command will be able | |
89 | to update the working tree with the latest changes. | |
90 | ||
91 | 'rebase':: | |
92 | This fetches revisions from the SVN parent of the current HEAD | |
93 | and rebases the current (uncommitted to SVN) work against it. | |
94 | ||
112f6385 SV |
95 | This works similarly to 'svn update' or 'git-pull' except that |
96 | it preserves linear history with 'git-rebase' instead of | |
97 | 'git-merge' for ease of dcommit-ing with git-svn. | |
a81ed0b6 | 98 | |
112f6385 SV |
99 | This accepts all options that 'git-svn fetch' and 'git-rebase' |
100 | accepts. However '--fetch-all' only fetches from the current | |
101 | [svn-remote], and not all [svn-remote] definitions. | |
a81ed0b6 | 102 | |
112f6385 SV |
103 | Like 'git-rebase'; this requires that the working tree be clean |
104 | and have no uncommitted changes. | |
cc1793e2 | 105 | |
dee41f3e EW |
106 | -l;; |
107 | --local;; | |
108 | Do not fetch remotely; only run 'git-rebase' against the | |
109 | last fetched commit from the upstream SVN. | |
a81ed0b6 | 110 | |
b22d4497 | 111 | 'dcommit':: |
2eff1425 | 112 | Commit each diff from a specified head directly to the SVN |
b22d4497 | 113 | repository, and then rebase or reset (depending on whether or |
2eff1425 EW |
114 | not there is a diff between SVN and head). This will create |
115 | a revision in SVN for each commit in git. | |
116 | It is recommended that you run git-svn fetch and rebase (not | |
117 | pull or merge) your commits against the latest changes in the | |
118 | SVN repository. | |
dd31da2f EW |
119 | An optional command-line argument may be specified as an |
120 | alternative to HEAD. | |
3289e86e | 121 | This is advantageous over 'set-tree' (below) because it produces |
b22d4497 | 122 | cleaner, more linear history. |
171af110 KW |
123 | + |
124 | --no-rebase;; | |
125 | After committing, do not rebase or reset. | |
112f6385 | 126 | -- |
b22d4497 | 127 | |
e8f5d908 EW |
128 | 'log':: |
129 | This should make it easy to look up svn log messages when svn | |
130 | users refer to -r/--revision numbers. | |
112f6385 SV |
131 | + |
132 | The following features from `svn log' are supported: | |
133 | + | |
134 | -- | |
135 | --revision=<n>[:<n>];; | |
136 | is supported, non-numeric args are not: | |
137 | HEAD, NEXT, BASE, PREV, etc ... | |
138 | -v/--verbose;; | |
139 | it's not completely compatible with the --verbose | |
140 | output in svn log, but reasonably close. | |
141 | --limit=<n>;; | |
142 | is NOT the same as --max-count, doesn't count | |
143 | merged/excluded commits | |
144 | --incremental;; | |
145 | supported | |
146 | -- | |
147 | + | |
148 | New features: | |
149 | + | |
150 | -- | |
151 | --show-commit;; | |
152 | shows the git commit sha1, as well | |
153 | --oneline;; | |
154 | our version of --pretty=oneline | |
155 | -- | |
156 | + | |
157 | Any other arguments are passed directly to `git log' | |
e8f5d908 | 158 | |
112f6385 | 159 | -- |
26e60160 AR |
160 | 'find-rev':: |
161 | When given an SVN revision number of the form 'rN', returns the | |
b3cb7e45 AR |
162 | corresponding git commit hash (this can optionally be followed by a |
163 | tree-ish to specify which branch should be searched). When given a | |
164 | tree-ish, returns the corresponding SVN revision number. | |
26e60160 | 165 | |
3289e86e | 166 | 'set-tree':: |
e8f5d908 | 167 | You should consider using 'dcommit' instead of this command. |
3397f9df EW |
168 | Commit specified commit or tree objects to SVN. This relies on |
169 | your imported fetch data being up-to-date. This makes | |
170 | absolutely no attempts to do patching when committing to SVN, it | |
171 | simply overwrites files with those specified in the tree or | |
172 | commit. All merging is assumed to have taken place | |
173 | independently of git-svn functions. | |
174 | ||
0ea4d4c9 | 175 | 'show-ignore':: |
8f22562c EW |
176 | Recursively finds and lists the svn:ignore property on |
177 | directories. The output is suitable for appending to | |
178 | the $GIT_DIR/info/exclude file. | |
179 | ||
e8f5d908 EW |
180 | 'commit-diff':: |
181 | Commits the diff of two tree-ish arguments from the | |
23bfbb81 | 182 | command-line. This command is intended for interoperability with |
e8f5d908 EW |
183 | git-svnimport and does not rely on being inside an git-svn |
184 | init-ed repository. This command takes three arguments, (a) the | |
185 | original tree to diff against, (b) the new tree result, (c) the | |
186 | URL of the target Subversion repository. The final argument | |
187 | (URL) may be omitted if you are working from a git-svn-aware | |
188 | repository (that has been init-ed with git-svn). | |
45bf473a | 189 | The -r<revision> option is required for this. |
e8f5d908 | 190 | |
0ea4d4c9 JF |
191 | -- |
192 | ||
3397f9df EW |
193 | OPTIONS |
194 | ------- | |
0ea4d4c9 JF |
195 | -- |
196 | ||
a836a0e1 | 197 | --shared[={false|true|umask|group|all|world|everybody}]:: |
e8f5d908 EW |
198 | --template=<template_directory>:: |
199 | Only used with the 'init' command. | |
5c94f87e | 200 | These are passed directly to gitlink:git-init[1]. |
e8f5d908 | 201 | |
3397f9df EW |
202 | -r <ARG>:: |
203 | --revision <ARG>:: | |
3397f9df | 204 | |
a836a0e1 | 205 | Used with the 'fetch' command. |
0ea4d4c9 | 206 | |
a836a0e1 EW |
207 | This allows revision ranges for partial/cauterized history |
208 | to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges), | |
209 | $NUMBER:HEAD, and BASE:$NUMBER are all supported. | |
3397f9df | 210 | |
a836a0e1 EW |
211 | This can allow you to make partial mirrors when running fetch; |
212 | but is generally not recommended because history will be skipped | |
213 | and lost. | |
3397f9df EW |
214 | |
215 | -:: | |
216 | --stdin:: | |
3397f9df | 217 | |
3289e86e | 218 | Only used with the 'set-tree' command. |
0ea4d4c9 JF |
219 | |
220 | Read a list of commits from stdin and commit them in reverse | |
221 | order. Only the leading sha1 is read from each line, so | |
222 | git-rev-list --pretty=oneline output can be used. | |
3397f9df EW |
223 | |
224 | --rmdir:: | |
3397f9df | 225 | |
3289e86e | 226 | Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. |
0ea4d4c9 JF |
227 | |
228 | Remove directories from the SVN tree if there are no files left | |
229 | behind. SVN can version empty directories, and they are not | |
230 | removed by default if there are no files left in them. git | |
231 | cannot version empty directories. Enabling this flag will make | |
232 | the commit to SVN act like git. | |
3397f9df | 233 | |
e0d10e1c | 234 | config key: svn.rmdir |
20b1d700 | 235 | |
3397f9df EW |
236 | -e:: |
237 | --edit:: | |
3397f9df | 238 | |
3289e86e | 239 | Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. |
3397f9df | 240 | |
0ea4d4c9 JF |
241 | Edit the commit message before committing to SVN. This is off by |
242 | default for objects that are commits, and forced on when committing | |
243 | tree objects. | |
244 | ||
e0d10e1c | 245 | config key: svn.edit |
20b1d700 | 246 | |
72942938 EW |
247 | -l<num>:: |
248 | --find-copies-harder:: | |
72942938 | 249 | |
3289e86e | 250 | Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands. |
0ea4d4c9 JF |
251 | |
252 | They are both passed directly to git-diff-tree see | |
253 | gitlink:git-diff-tree[1] for more information. | |
72942938 | 254 | |
0ea4d4c9 | 255 | [verse] |
e0d10e1c TP |
256 | config key: svn.l |
257 | config key: svn.findcopiesharder | |
20b1d700 | 258 | |
81c5a0e6 EW |
259 | -A<filename>:: |
260 | --authors-file=<filename>:: | |
261 | ||
0ea4d4c9 JF |
262 | Syntax is compatible with the files used by git-svnimport and |
263 | git-cvsimport: | |
81c5a0e6 EW |
264 | |
265 | ------------------------------------------------------------------------ | |
0ea4d4c9 | 266 | loginname = Joe User <user@example.com> |
81c5a0e6 EW |
267 | ------------------------------------------------------------------------ |
268 | ||
0ea4d4c9 JF |
269 | If this option is specified and git-svn encounters an SVN |
270 | committer name that does not exist in the authors-file, git-svn | |
271 | will abort operation. The user will then have to add the | |
272 | appropriate entry. Re-running the previous git-svn command | |
273 | after the authors-file is modified should continue operation. | |
81c5a0e6 | 274 | |
e0d10e1c | 275 | config key: svn.authorsfile |
e8f5d908 EW |
276 | |
277 | -q:: | |
278 | --quiet:: | |
cec21ca7 | 279 | Make git-svn less verbose. |
e8f5d908 EW |
280 | |
281 | --repack[=<n>]:: | |
112f6385 SV |
282 | --repack-flags=<flags>:: |
283 | ||
284 | These should help keep disk usage sane for large fetches | |
285 | with many revisions. | |
e8f5d908 | 286 | |
112f6385 SV |
287 | --repack takes an optional argument for the number of revisions |
288 | to fetch before repacking. This defaults to repacking every | |
289 | 1000 commits fetched if no argument is specified. | |
e8f5d908 | 290 | |
112f6385 | 291 | --repack-flags are passed directly to gitlink:git-repack[1]. |
e8f5d908 | 292 | |
112f6385 | 293 | [verse] |
e0d10e1c TP |
294 | config key: svn.repack |
295 | config key: svn.repackflags | |
0ea4d4c9 | 296 | |
b22d4497 EW |
297 | -m:: |
298 | --merge:: | |
299 | -s<strategy>:: | |
300 | --strategy=<strategy>:: | |
301 | ||
a81ed0b6 | 302 | These are only used with the 'dcommit' and 'rebase' commands. |
b22d4497 EW |
303 | |
304 | Passed directly to git-rebase when using 'dcommit' if a | |
305 | 'git-reset' cannot be used (see dcommit). | |
306 | ||
307 | -n:: | |
308 | --dry-run:: | |
309 | ||
310 | This is only used with the 'dcommit' command. | |
311 | ||
312 | Print out the series of git arguments that would show | |
313 | which diffs would be committed to SVN. | |
314 | ||
0ea4d4c9 | 315 | -- |
81c5a0e6 | 316 | |
448c81b4 EW |
317 | ADVANCED OPTIONS |
318 | ---------------- | |
0ea4d4c9 JF |
319 | -- |
320 | ||
448c81b4 EW |
321 | -i<GIT_SVN_ID>:: |
322 | --id <GIT_SVN_ID>:: | |
0ea4d4c9 | 323 | |
a836a0e1 EW |
324 | This sets GIT_SVN_ID (instead of using the environment). This |
325 | allows the user to override the default refname to fetch from | |
326 | when tracking a single URL. The 'log' and 'dcommit' commands | |
327 | no longer require this switch as an argument. | |
0ea4d4c9 | 328 | |
9760adcc EW |
329 | -R<remote name>:: |
330 | --svn-remote <remote name>:: | |
331 | Specify the [svn-remote "<remote name>"] section to use, | |
a836a0e1 EW |
332 | this allows SVN multiple repositories to be tracked. |
333 | Default: "svn" | |
9760adcc | 334 | |
e8f5d908 EW |
335 | --follow-parent:: |
336 | This is especially helpful when we're tracking a directory | |
337 | that has been moved around within the repository, or if we | |
338 | started tracking a branch and never tracked the trunk it was | |
0bed5eaa EW |
339 | descended from. This feature is enabled by default, use |
340 | --no-follow-parent to disable it. | |
e8f5d908 | 341 | |
e0d10e1c | 342 | config key: svn.followparent |
e8f5d908 | 343 | |
a81ed0b6 EW |
344 | -- |
345 | CONFIG FILE-ONLY OPTIONS | |
346 | ------------------------ | |
347 | -- | |
348 | ||
0dfaf0a4 EW |
349 | svn.noMetadata:: |
350 | svn-remote.<name>.noMetadata:: | |
e8f5d908 | 351 | |
112f6385 SV |
352 | This gets rid of the git-svn-id: lines at the end of every commit. |
353 | ||
354 | If you lose your .git/svn/git-svn/.rev_db file, git-svn will not | |
355 | be able to rebuild it and you won't be able to fetch again, | |
356 | either. This is fine for one-shot imports. | |
e8f5d908 | 357 | |
112f6385 SV |
358 | The 'git-svn log' command will not work on repositories using |
359 | this, either. Using this conflicts with the 'useSvmProps' | |
360 | option for (hopefully) obvious reasons. | |
97ae0911 | 361 | |
0dfaf0a4 EW |
362 | svn.useSvmProps:: |
363 | svn-remote.<name>.useSvmProps:: | |
97ae0911 | 364 | |
112f6385 SV |
365 | This allows git-svn to re-map repository URLs and UUIDs from |
366 | mirrors created using SVN::Mirror (or svk) for metadata. | |
367 | ||
368 | If an SVN revision has a property, "svm:headrev", it is likely | |
369 | that the revision was created by SVN::Mirror (also used by SVK). | |
370 | The property contains a repository UUID and a revision. We want | |
371 | to make it look like we are mirroring the original URL, so | |
372 | introduce a helper function that returns the original identity | |
373 | URL and UUID, and use it when generating metadata in commit | |
374 | messages. | |
97ae0911 | 375 | |
0dfaf0a4 EW |
376 | svn.useSvnsyncProps:: |
377 | svn-remote.<name>.useSvnsyncprops:: | |
a81ed0b6 EW |
378 | Similar to the useSvmProps option; this is for users |
379 | of the svnsync(1) command distributed with SVN 1.4.x and | |
380 | later. | |
381 | ||
0dfaf0a4 | 382 | svn-remote.<name>.rewriteRoot:: |
a81ed0b6 EW |
383 | This allows users to create repositories from alternate |
384 | URLs. For example, an administrator could run git-svn on the | |
385 | server locally (accessing via file://) but wish to distribute | |
386 | the repository with a public http:// or svn:// URL in the | |
387 | metadata so users of it will see the public URL. | |
388 | ||
a81ed0b6 EW |
389 | Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps |
390 | options all affect the metadata generated and used by git-svn; they | |
391 | *must* be set in the configuration file before any history is imported | |
392 | and these settings should never be changed once they are set. | |
393 | ||
394 | Additionally, only one of these four options can be used per-svn-remote | |
395 | section because they affect the 'git-svn-id:' metadata line. | |
e8f5d908 | 396 | |
0ea4d4c9 | 397 | -- |
448c81b4 | 398 | |
112f6385 SV |
399 | BASIC EXAMPLES |
400 | -------------- | |
3397f9df | 401 | |
0d313b2b | 402 | Tracking and contributing to a the trunk of a Subversion-managed project: |
3397f9df | 403 | |
20b1d700 | 404 | ------------------------------------------------------------------------ |
a81ed0b6 EW |
405 | # Clone a repo (like git clone): |
406 | git-svn clone http://svn.foo.org/project/trunk | |
407 | # Enter the newly cloned directory: | |
408 | cd trunk | |
409 | # You should be on master branch, double-check with git-branch | |
410 | git branch | |
411 | # Do some work and commit locally to git: | |
412 | git commit ... | |
413 | # Something is committed to SVN, rebase your local changes against the | |
414 | # latest changes in SVN: | |
415 | git-svn rebase | |
416 | # Now commit your changes (that were committed previously using git) to SVN, | |
417 | # as well as automatically updating your working HEAD: | |
4511c899 | 418 | git-svn dcommit |
20b1d700 | 419 | # Append svn:ignore settings to the default git exclude file: |
8f22562c | 420 | git-svn show-ignore >> .git/info/exclude |
20b1d700 | 421 | ------------------------------------------------------------------------ |
3397f9df | 422 | |
0d313b2b EW |
423 | Tracking and contributing to an entire Subversion-managed project |
424 | (complete with a trunk, tags and branches): | |
0d313b2b EW |
425 | |
426 | ------------------------------------------------------------------------ | |
a81ed0b6 EW |
427 | # Clone a repo (like git clone): |
428 | git-svn clone http://svn.foo.org/project -T trunk -b branches -t tags | |
429 | # View all branches and tags you have cloned: | |
430 | git branch -r | |
431 | # Reset your master to trunk (or any other branch, replacing 'trunk' | |
432 | # with the appropriate name): | |
433 | git reset --hard remotes/trunk | |
434 | # You may only dcommit to one branch/tag/trunk at a time. The usage | |
20f50f16 | 435 | # of dcommit/rebase/show-ignore should be the same as above. |
0d313b2b EW |
436 | ------------------------------------------------------------------------ |
437 | ||
7d4aef40 AR |
438 | The initial 'git-svn clone' can be quite time-consuming |
439 | (especially for large Subversion repositories). If multiple | |
440 | people (or one person with multiple machines) want to use | |
441 | git-svn to interact with the same Subversion repository, you can | |
442 | do the initial 'git-svn clone' to a repository on a server and | |
443 | have each person clone that repository with 'git clone': | |
444 | ||
445 | ------------------------------------------------------------------------ | |
446 | # Do the initial import on a server | |
447 | ssh server "cd /pub && git-svn clone http://svn.foo.org/project | |
448 | # Clone locally | |
449 | git clone server:/pub/project | |
450 | # Tell git-svn which branch contains the Subversion commits | |
451 | git update-ref refs/remotes/git-svn origin/master | |
452 | # Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server) | |
453 | git-svn init http://svn.foo.org/project | |
454 | # Pull the latest changes from Subversion | |
455 | git-svn rebase | |
456 | ------------------------------------------------------------------------ | |
457 | ||
2eff1425 EW |
458 | REBASE VS. PULL/MERGE |
459 | --------------------- | |
2e93115e EW |
460 | |
461 | Originally, git-svn recommended that the remotes/git-svn branch be | |
2eff1425 EW |
462 | pulled or merged from. This is because the author favored |
463 | 'git-svn set-tree B' to commit a single head rather than the | |
464 | 'git-svn set-tree A..B' notation to commit multiple commits. | |
465 | ||
466 | If you use 'git-svn set-tree A..B' to commit several diffs and you do | |
467 | not have the latest remotes/git-svn merged into my-branch, you should | |
a81ed0b6 | 468 | use 'git-svn rebase' to update your work branch instead of 'git pull' or |
2eff1425 EW |
469 | 'git merge'. 'pull/merge' can cause non-linear history to be flattened |
470 | when committing into SVN, which can lead to merge commits reversing | |
471 | previous commits in SVN. | |
2e93115e | 472 | |
3397f9df EW |
473 | DESIGN PHILOSOPHY |
474 | ----------------- | |
475 | Merge tracking in Subversion is lacking and doing branched development | |
4511c899 EW |
476 | with Subversion is cumbersome as a result. git-svn does not do |
477 | automated merge/branch tracking by default and leaves it entirely up to | |
a836a0e1 EW |
478 | the user on the git side. git-svn does however follow copy |
479 | history of the directory that it is tracking, however (much like | |
480 | how 'svn log' works). | |
1d52aba8 | 481 | |
3397f9df EW |
482 | BUGS |
483 | ---- | |
e8f5d908 | 484 | |
a81ed0b6 EW |
485 | We ignore all SVN properties except svn:executable. Any unhandled |
486 | properties are logged to $GIT_DIR/svn/<refname>/unhandled.log | |
3397f9df | 487 | |
bbe0c9b8 EW |
488 | Renamed and copied directories are not detected by git and hence not |
489 | tracked when committing to SVN. I do not plan on adding support for | |
490 | this as it's quite difficult and time-consuming to get working for all | |
a81ed0b6 EW |
491 | the possible corner cases (git doesn't do it, either). Committing |
492 | renamed and copied files are fully supported if they're similar enough | |
493 | for git to detect them. | |
bbe0c9b8 | 494 | |
a836a0e1 EW |
495 | CONFIGURATION |
496 | ------------- | |
497 | ||
498 | git-svn stores [svn-remote] configuration information in the | |
499 | repository .git/config file. It is similar the core git | |
500 | [remote] sections except 'fetch' keys do not accept glob | |
501 | arguments; but they are instead handled by the 'branches' | |
502 | and 'tags' keys. Since some SVN repositories are oddly | |
503 | configured with multiple projects glob expansions such those | |
504 | listed below are allowed: | |
505 | ||
506 | ------------------------------------------------------------------------ | |
507 | [svn-remote "project-a"] | |
508 | url = http://server.org/svn | |
509 | branches = branches/*/project-a:refs/remotes/project-a/branches/* | |
510 | tags = tags/*/project-a:refs/remotes/project-a/tags/* | |
511 | trunk = trunk/project-a:refs/remotes/project-a/trunk | |
512 | ------------------------------------------------------------------------ | |
513 | ||
514 | Keep in mind that the '*' (asterisk) wildcard of the local ref | |
515 | (left of the ':') *must* be the farthest right path component; | |
516 | however the remote wildcard may be anywhere as long as it's own | |
517 | independent path componet (surrounded by '/' or EOL). This | |
518 | type of configuration is not automatically created by 'init' and | |
519 | should be manually entered with a text-editor or using | |
520 | gitlink:git-config[1] | |
521 | ||
2e93115e EW |
522 | SEE ALSO |
523 | -------- | |
524 | gitlink:git-rebase[1] | |
525 | ||
3397f9df EW |
526 | Author |
527 | ------ | |
528 | Written by Eric Wong <normalperson@yhbt.net>. | |
529 | ||
530 | Documentation | |
531 | ------------- | |
532 | Written by Eric Wong <normalperson@yhbt.net>. |