7 git-svnimport - Import a SVN repository into git
13 'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]
14 [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]
15 [ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]
16 [ -s start_chg ] [ -m ] [ -r ] [ -M regex ]
17 [ -I <ignorefile_name> ] [ -A <author_file> ]
18 <SVN_repository_URL> [ <path> ]
23 Imports a SVN repository into git. It will either create a new
24 repository, or incrementally import into an existing one.
26 SVN access is done by the SVN::Perl module.
28 git-svnimport assumes that SVN repositories are organized into one
29 "trunk" directory where the main development happens, "branch/FOO"
30 directories for branches, and "/tags/FOO" directories for tags.
31 Other subdirectories are ignored.
33 git-svnimport creates a file ".git/svn2git", which is required for
34 incremental SVN imports.
39 The GIT repository to import to. If the directory doesn't
40 exist, it will be created. Default is the current directory.
43 Start importing at this SVN change number. The default is 1.
45 When importing incrementally, you might need to edit the .git/svn2git file.
48 Import-only: don't perform a checkout after importing. This option
49 ensures the working directory and index remain untouched and will
50 not create them if they do not exist.
53 Name the SVN trunk. Default "trunk".
56 Name the SVN subdirectory for tags. Default "tags".
59 Name the SVN subdirectory for branches. Default "branches".
61 -o <branch-for-HEAD>::
62 The 'trunk' branch from SVN is imported to the 'origin' branch within
63 the git repository. Use this option if you want to import into a
67 Prepend 'rX: ' to commit messages, where X is the imported
70 -I <ignorefile_name>::
71 Import the svn:ignore directory property to files with this
72 name in each directory. (The Subversion and GIT ignore
73 syntaxes are similar enough that using the Subversion patterns
74 directly with "-I .gitignore" will almost always just work.)
77 Read a file with lines on the form
80 username = User's Full Name <email@addr.es>
84 and use "User's Full Name <email@addr.es>" as the GIT
85 author and committer for Subversion commits made by
86 "username". If encountering a commit made by a user not in the
89 For convenience, this data is saved to $GIT_DIR/svn-authors
90 each time the -A option is provided, and read from that same
91 file each time git-svnimport is run with an existing GIT
92 repository without -A.
95 Attempt to detect merges based on the commit message. This option
96 will enable default regexes that try to capture the name source
97 branch name from the commit message.
100 Attempt to detect merges based on the commit message with a custom
101 regex. It can be used with -m to also see the default regexes.
102 You must escape forward slashes.
105 Specify a maximum revision number to pull.
107 Formerly, this option controlled how many revisions to pull,
108 due to SVN memory leaks. (These have been worked around.)
111 Verbosity: let 'svnimport' report what it is doing.
114 Use direct HTTP requests if possible. The "<path>" argument is used
115 only for retrieving the SVN logs; the path to the contents is
116 included in the SVN log.
119 Use direct HTTP requests if possible. The "<path>" argument is used
120 for retrieving the logs, as well as for the contents.
122 There's no safe way to automatically find out which of these options to
123 use, so you need to try both. Usually, the one that's wrong will die
124 with a 40x error pretty quickly.
126 <SVN_repository_URL>::
127 The URL of the SVN module you want to import. For local
128 repositories, use "file:///absolute/path".
130 If you're using the "-d" or "-D" option, this is the URL of the SVN
131 repository itself; it usually ends in "/svn".
134 The path to the module you want to check out.
137 Print a short usage message and exit.
141 If '-v' is specified, the script reports what it is doing.
143 Otherwise, success is indicated the Unix way, i.e. by simply exiting with
148 Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
149 various participants of the git-list <git@vger.kernel.org>.
151 Based on a cvs2git script by the same author.
155 Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
159 Part of the gitlink:git[7] suite