Difference between revisions of "Git-svn"
(Created page with "If you use <code>git-svn</code> (don't, use reposurgeon) to convert to git you'll want to be aware of the --prefix option to <code>git init</code>. From the [https://git-...") |
(This changes nothing) |
||
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | If you use <code>git-svn</code> | + | If you try to use <code>git-svn</code> to convert to git you'll want to be aware of the --prefix option to <code>git init</code>. From the [https://git-scm.com/docs/git-svn the manual] |
− | < | + | <blockquote> |
− | --prefix=<prefix> | + | --prefix=<prefix><br /> |
− | This allows one to specify a prefix which is prepended to the names of remotes if trunk/branches/tags are specified. The prefix does not automatically include a trailing slash, so be sure you include one in the argument if that is what you want. If --branches/-b is specified, the prefix must include a trailing slash. Setting a prefix (with a trailing slash) is strongly encouraged in any case, as your SVN- | + | This allows one to specify a prefix which is prepended to the names of remotes if trunk/branches/tags are specified. The prefix does not automatically include a trailing slash, so be sure you include one in the argument if that is what you want. If --branches/-b is specified, the prefix must include a trailing slash. Setting a prefix (with a trailing slash) is strongly encouraged in any case, as your SVN--tracking ref layout (refs/remotes/$remote/). Setting a prefix is also useful if you wish to track multiple projects that share a common repository. By default, the prefix is set to origin/. |
Note | Note | ||
− | Before Git v2.0, the default prefix was "" (no prefix). This meant that SVN- | + | Before Git v2.0, the default prefix was "" (no prefix). This meant that SVN--tracking refs are organized. If you still want the old default, you can get it by passing --prefix "" on the command line (--< v2.37). |
− | </ | + | </blockquote> |
+ | |||
+ | == Bottom Line == | ||
+ | In all but the most trivial cases, git-svn is not adequate as a conversion tool. See http://esr.ibiblio.org/?p=6778, and also http://www.catb.org/~esr/reposurgeon/features.html for a run-down of the top contenders (and where they fall short). | ||
+ | |||
+ | [[Reposurgeon]] is the best conversion tool for migrating from Subversion to Git. | ||
+ | |||
+ | [[Category:Subversion]] | ||
+ | [[Category:Version Control]] | ||
+ | [[Category:Git]] | ||
+ | [[Category:DevOps]] | ||
+ | [[Category:Development]] |
Latest revision as of 08:52, 29 December 2018
If you try to use git-svn
to convert to git you'll want to be aware of the --prefix option to git init
. From the the manual
--prefix=<prefix>
This allows one to specify a prefix which is prepended to the names of remotes if trunk/branches/tags are specified. The prefix does not automatically include a trailing slash, so be sure you include one in the argument if that is what you want. If --branches/-b is specified, the prefix must include a trailing slash. Setting a prefix (with a trailing slash) is strongly encouraged in any case, as your SVN--tracking ref layout (refs/remotes/$remote/). Setting a prefix is also useful if you wish to track multiple projects that share a common repository. By default, the prefix is set to origin/.Note Before Git v2.0, the default prefix was "" (no prefix). This meant that SVN--tracking refs are organized. If you still want the old default, you can get it by passing --prefix "" on the command line (--< v2.37).
Bottom Line[edit | edit source]
In all but the most trivial cases, git-svn is not adequate as a conversion tool. See http://esr.ibiblio.org/?p=6778, and also http://www.catb.org/~esr/reposurgeon/features.html for a run-down of the top contenders (and where they fall short).
Reposurgeon is the best conversion tool for migrating from Subversion to Git.