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                 [ -R <repack_each_revs>] [ -P <path_from_trunk> ]
 
  19                 <SVN_repository_URL> [ <path> ]
 
  24 Imports a SVN repository into git. It will either create a new
 
  25 repository, or incrementally import into an existing one.
 
  27 SVN access is done by the SVN::Perl module.
 
  29 git-svnimport assumes that SVN repositories are organized into one
 
  30 "trunk" directory where the main development happens, "branches/FOO"
 
  31 directories for branches, and "/tags/FOO" directories for tags.
 
  32 Other subdirectories are ignored.
 
  34 git-svnimport creates a file ".git/svn2git", which is required for
 
  35 incremental SVN imports.
 
  40         The GIT repository to import to.  If the directory doesn't
 
  41         exist, it will be created.  Default is the current directory.
 
  44         Start importing at this SVN change number. The  default is 1.
 
  46 When importing incrementally, you might need to edit the .git/svn2git file.
 
  49         Import-only: don't perform a checkout after importing.  This option
 
  50         ensures the working directory and index remain untouched and will
 
  51         not create them if they do not exist.
 
  54         Name the SVN trunk. Default "trunk".
 
  57         Name the SVN subdirectory for tags. Default "tags".
 
  60         Name the SVN subdirectory for branches. Default "branches".
 
  62 -o <branch-for-HEAD>::
 
  63         The 'trunk' branch from SVN is imported to the 'origin' branch within
 
  64         the git repository. Use this option if you want to import into a
 
  68         Prepend 'rX: ' to commit messages, where X is the imported
 
  72         Replace underscores in tag names with periods.
 
  74 -I <ignorefile_name>::
 
  75         Import the svn:ignore directory property to files with this
 
  76         name in each directory. (The Subversion and GIT ignore
 
  77         syntaxes are similar enough that using the Subversion patterns
 
  78         directly with "-I .gitignore" will almost always just work.)
 
  81         Read a file with lines on the form
 
  84         username = User's Full Name <email@addr.es>
 
  88 and use "User's Full Name <email@addr.es>" as the GIT
 
  89 author and committer for Subversion commits made by
 
  90 "username". If encountering a commit made by a user not in the
 
  93 For convenience, this data is saved to $GIT_DIR/svn-authors
 
  94 each time the -A option is provided, and read from that same
 
  95 file each time git-svnimport is run with an existing GIT
 
  96 repository without -A.
 
  99         Attempt to detect merges based on the commit message. This option
 
 100         will enable default regexes that try to capture the name source
 
 101         branch name from the commit message.
 
 104         Attempt to detect merges based on the commit message with a custom
 
 105         regex. It can be used with -m to also see the default regexes.
 
 106         You must escape forward slashes.
 
 109         Specify a maximum revision number to pull.
 
 111 Formerly, this option controlled how many revisions to pull,
 
 112 due to SVN memory leaks. (These have been worked around.)
 
 114 -R <repack_each_revs>::
 
 115         Specify how often git repository should be repacked.
 
 117 The default value is 1000. git-svnimport will do imports in chunks of 1000
 
 118 revisions, after each chunk the git repository will be repacked. To disable
 
 119 this behavior specify some large value here which is greater than the number of
 
 122 -P <path_from_trunk>::
 
 123         Partial import of the SVN tree.
 
 125 By default, the whole tree on the SVN trunk (/trunk) is imported.
 
 126 '-P my/proj' will import starting only from '/trunk/my/proj'.
 
 127 This option is useful when you want to import one project from a
 
 128 svn repo which hosts multiple projects under the same trunk.
 
 131         Verbosity: let 'svnimport' report what it is doing.
 
 134         Use direct HTTP requests if possible. The "<path>" argument is used
 
 135         only for retrieving the SVN logs; the path to the contents is
 
 136         included in the SVN log.
 
 139         Use direct HTTP requests if possible. The "<path>" argument is used
 
 140         for retrieving the logs, as well as for the contents.
 
 142 There's no safe way to automatically find out which of these options to
 
 143 use, so you need to try both. Usually, the one that's wrong will die
 
 144 with a 40x error pretty quickly.
 
 146 <SVN_repository_URL>::
 
 147         The URL of the SVN module you want to import. For local
 
 148         repositories, use "file:///absolute/path".
 
 150 If you're using the "-d" or "-D" option, this is the URL of the SVN
 
 151 repository itself; it usually ends in "/svn".
 
 154         The path to the module you want to check out.
 
 157         Print a short usage message and exit.
 
 161 If '-v' is specified, the script reports what it is doing.
 
 163 Otherwise, success is indicated the Unix way, i.e. by simply exiting with
 
 168 Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
 
 169 various participants of the git-list <git@vger.kernel.org>.
 
 171 Based on a cvs2git script by the same author.
 
 175 Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
 
 179 Part of the gitlink:git[7] suite