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