Documentation / git-svnimport.txton commit diff-delta: allow reusing of the reference buffer index (38fd072)
   1git-svnimport(1)
   2================
   3v0.1, July 2005
   4
   5NAME
   6----
   7git-svnimport - Import a SVN repository into git
   8
   9
  10SYNOPSIS
  11--------
  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> ]
  18
  19
  20DESCRIPTION
  21-----------
  22Imports a SVN repository into git. It will either create a new
  23repository, or incrementally import into an existing one.
  24
  25SVN access is done by the SVN::Perl module.
  26
  27git-svnimport assumes that SVN repositories are organized into one
  28"trunk" directory where the main development happens, "branch/FOO"
  29directories for branches, and "/tags/FOO" directories for tags.
  30Other subdirectories are ignored.
  31
  32git-svnimport creates a file ".git/svn2git", which is required for
  33incremental SVN imports.
  34
  35OPTIONS
  36-------
  37-C <target-dir>::
  38        The GIT repository to import to.  If the directory doesn't
  39        exist, it will be created.  Default is the current directory.
  40
  41-s <start_rev>::
  42        Start importing at this SVN change number. The  default is 1.
  43+
  44When importing incrementally, you might need to edit the .git/svn2git file.
  45
  46-i::
  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.
  50
  51-T <trunk_subdir>::
  52        Name the SVN trunk. Default "trunk".
  53
  54-t <tag_subdir>::
  55        Name the SVN subdirectory for tags. Default "tags".
  56
  57-b <branch_subdir>::
  58        Name the SVN subdirectory for branches. Default "branches".
  59
  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
  63        different branch.
  64
  65-r::
  66        Prepend 'rX: ' to commit messages, where X is the imported
  67        subversion revision.
  68
  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.)
  74
  75-A <author_file>::
  76        Read a file with lines on the form
  77
  78          username = User's Full Name <email@addr.es>
  79
  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
  83        list, abort.
  84
  85        For convenience, this data is saved to $GIT_DIR/svn-authors
  86        each time the -A option is provided, and read from that same
  87        file each time git-svnimport is run with an existing GIT
  88        repository without -A.
  89
  90-m::
  91        Attempt to detect merges based on the commit message. This option
  92        will enable default regexes that try to capture the name source
  93        branch name from the commit message.
  94
  95-M <regex>::
  96        Attempt to detect merges based on the commit message with a custom
  97        regex. It can be used with -m to also see the default regexes.
  98        You must escape forward slashes.
  99
 100-l <max_rev>::
 101        Specify a maximum revision number to pull.
 102
 103        Formerly, this option controlled how many revisions to pull,
 104        due to SVN memory leaks. (These have been worked around.)
 105
 106-v::
 107        Verbosity: let 'svnimport' report what it is doing.
 108
 109-d::
 110        Use direct HTTP requests if possible. The "<path>" argument is used
 111        only for retrieving the SVN logs; the path to the contents is
 112        included in the SVN log.
 113
 114-D::
 115        Use direct HTTP requests if possible. The "<path>" argument is used
 116        for retrieving the logs, as well as for the contents.
 117+
 118There's no safe way to automatically find out which of these options to
 119use, so you need to try both. Usually, the one that's wrong will die
 120with a 40x error pretty quickly.
 121
 122<SVN_repository_URL>::
 123        The URL of the SVN module you want to import. For local
 124        repositories, use "file:///absolute/path".
 125+
 126If you're using the "-d" or "-D" option, this is the URL of the SVN
 127repository itself; it usually ends in "/svn".
 128
 129<path>::
 130        The path to the module you want to check out.
 131
 132-h::
 133        Print a short usage message and exit.
 134
 135OUTPUT
 136------
 137If '-v' is specified, the script reports what it is doing.
 138
 139Otherwise, success is indicated the Unix way, i.e. by simply exiting with
 140a zero exit status.
 141
 142Author
 143------
 144Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
 145various participants of the git-list <git@vger.kernel.org>.
 146
 147Based on a cvs2git script by the same author.
 148
 149Documentation
 150--------------
 151Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
 152
 153GIT
 154---
 155Part of the gitlink:git[7] suite
 156