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_rev]
14 [ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]
15 [ -s start_chg ] [ -m ] [ -r ] [ -M regex ]
16 [ -I <ignorefile_name> ] [ -A <author_file> ]
17 <SVN_repository_URL> [ <path> ]
22 Imports a SVN repository into git. It will either create a new
23 repository, or incrementally import into an existing one.
25 SVN access is done by the SVN::Perl module.
27 git-svnimport assumes that SVN repositories are organized into one
28 "trunk" directory where the main development happens, "branch/FOO"
29 directories for branches, and "/tags/FOO" directories for tags.
30 Other subdirectories are ignored.
32 git-svnimport creates a file ".git/svn2git", which is required for
33 incremental SVN imports.
38 The GIT repository to import to. If the directory doesn't
39 exist, it will be created. Default is the current directory.
42 Start importing at this SVN change number. The default is 1.
44 When importing incrementally, you might need to edit the .git/svn2git file.
47 Import-only: don't perform a checkout after importing. This option
48 ensures the working directory and index remain untouched and will
49 not create them if they do not exist.
52 Name the SVN trunk. Default "trunk".
55 Name the SVN subdirectory for tags. Default "tags".
58 Name the SVN subdirectory for branches. Default "branches".
60 -o <branch-for-HEAD>::
61 The 'trunk' branch from SVN is imported to the 'origin' branch within
62 the git repository. Use this option if you want to import into a
66 Prepend 'rX: ' to commit messages, where X is the imported
69 -I <ignorefile_name>::
70 Import the svn:ignore directory property to files with this
71 name in each directory. (The Subversion and GIT ignore
72 syntaxes are similar enough that using the Subversion patterns
73 directly with "-I .gitignore" will almost always just work.)
76 Read a file with lines on the form
78 username = User's Full Name <email@addr.es>
80 and use "User's Full Name <email@addr.es>" as the GIT
81 author and committer for Subversion commits made by
82 "username". If encountering a commit made by a user not in the
86 Attempt to detect merges based on the commit message. This option
87 will enable default regexes that try to capture the name source
88 branch name from the commit message.
91 Attempt to detect merges based on the commit message with a custom
92 regex. It can be used with -m to also see the default regexes.
93 You must escape forward slashes.
96 Specify a maximum revision number to pull.
98 Formerly, this option controlled how many revisions to pull,
99 due to SVN memory leaks. (These have been worked around.)
102 Verbosity: let 'svnimport' report what it is doing.
105 Use direct HTTP requests if possible. The "<path>" argument is used
106 only for retrieving the SVN logs; the path to the contents is
107 included in the SVN log.
110 Use direct HTTP requests if possible. The "<path>" argument is used
111 for retrieving the logs, as well as for the contents.
113 There's no safe way to automatically find out which of these options to
114 use, so you need to try both. Usually, the one that's wrong will die
115 with a 40x error pretty quickly.
117 <SVN_repository_URL>::
118 The URL of the SVN module you want to import. For local
119 repositories, use "file:///absolute/path".
121 If you're using the "-d" or "-D" option, this is the URL of the SVN
122 repository itself; it usually ends in "/svn".
125 The path to the module you want to check out.
128 Print a short usage message and exit.
132 If '-v' is specified, the script reports what it is doing.
134 Otherwise, success is indicated the Unix way, i.e. by simply exiting with
139 Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
140 various participants of the git-list <git@vger.kernel.org>.
142 Based on a cvs2git script by the same author.
146 Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
150 Part of the gitlink:git[7] suite