7 git-svnimport - Import a SVN repository into git
12 'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]
13 [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_nr_changes]
14 [ -b branch_subdir ] [ -t trunk_subdir ] [ -T tag_subdir ]
15 [ -s start_chg ] [ -m ] [ -M regex ]
16 <SVN_repository_URL> [ <path> ]
21 Imports a SVN repository into git. It will either create a new
22 repository, or incrementally import into an existing one.
24 SVN access is done by the SVN:: Perl module.
26 git-svnimport assumes that SVN repositories are organized into one
27 "trunk" directory where the main development happens, "branch/FOO"
28 directories for branches, and "/tags/FOO" directories for tags.
29 Other subdirectories are ignored.
31 git-svnimport creates a file ".git/svn2git", which is required for
32 incremental SVN imports.
37 The GIT repository to import to. If the directory doesn't
38 exist, it will be created. Default is the current directory.
41 Start importing at this SVN change number. The default is 1.
43 When importing incementally, you might need to edit the .git/svn2git file.
46 Import-only: don't perform a checkout after importing. This option
47 ensures the working directory and index remain untouched and will
48 not create them if they do not exist.
51 Name the SVN trunk. Default "trunk".
54 Name the SVN subdirectory for tags. Default "tags".
57 Name the SVN subdirectory for branches. Default "branches".
59 -o <branch-for-HEAD>::
60 The 'trunk' branch from SVN is imported to the 'origin' branch within
61 the git repository. Use this option if you want to import into a
65 Attempt to detect merges based on the commit message. This option
66 will enable default regexes that try to capture the name source
67 branch name from the commit message.
70 Attempt to detect merges based on the commit message with a custom
71 regex. It can be used with -m to also see the default regexes.
72 You must escape forward slashes.
74 -l <max_num_changes>::
75 Limit the number of SVN changesets we pull before quitting.
76 This option is necessary because the SVN library has serious memory
77 leaks; the recommended value for nontrivial imports is 100.
79 git-svnimport will still exit with a zero exit code. You can check
80 the size of the file ".git/svn2git" to determine whether to call
84 Verbosity: let 'svnimport' report what it is doing.
87 Use direct HTTP requests if possible. The "<path>" argument is used
88 only for retrieving the SVN logs; the path to the contents is
89 included in the SVN log.
92 Use direct HTTP requests if possible. The "<path>" argument is used
93 for retrieving the logs, as well as for the contents.
95 There's no safe way to automatically find out which of these options to
96 use, so you need to try both. Usually, the one that's wrong will die
97 with a 40x error pretty quickly.
99 <SVN_repository_URL>::
100 The URL of the SVN module you want to import. For local
101 repositories, use "file:///absolute/path".
103 If you're using the "-d" or "-D" option, this is the URL of the SVN
104 repository itself; it usually ends in "/svn".
106 <SVN_repository_URL>::
107 The URL of the SVN module you want to import. For local
108 repositories, use "file:///absolute/path".
111 The path to the module you want to check out.
114 Print a short usage message and exit.
118 If '-v' is specified, the script reports what it is doing.
120 Otherwise, success is indicated the Unix way, i.e. by simply exiting with
125 Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
126 various participants of the git-list <git@vger.kernel.org>.
128 Based on a cvs2git script by the same author.
132 Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
136 Part of the gitlink:git[7] suite