Documentation / git-svnimport.txton commit svnimport: Convert the svn:ignore property (c55f3ff)
   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> ] <SVN_repository_URL> [ <path> ]
  17
  18
  19DESCRIPTION
  20-----------
  21Imports a SVN repository into git. It will either create a new
  22repository, or incrementally import into an existing one.
  23
  24SVN access is done by the SVN::Perl module.
  25
  26git-svnimport assumes that SVN repositories are organized into one
  27"trunk" directory where the main development happens, "branch/FOO"
  28directories for branches, and "/tags/FOO" directories for tags.
  29Other subdirectories are ignored.
  30
  31git-svnimport creates a file ".git/svn2git", which is required for
  32incremental SVN imports.
  33
  34OPTIONS
  35-------
  36-C <target-dir>::
  37        The GIT repository to import to.  If the directory doesn't
  38        exist, it will be created.  Default is the current directory.
  39
  40-s <start_rev>::
  41        Start importing at this SVN change number. The  default is 1.
  42+
  43When importing incrementally, you might need to edit the .git/svn2git file.
  44
  45-i::
  46        Import-only: don't perform a checkout after importing.  This option
  47        ensures the working directory and index remain untouched and will
  48        not create them if they do not exist.
  49
  50-T <trunk_subdir>::
  51        Name the SVN trunk. Default "trunk".
  52
  53-t <tag_subdir>::
  54        Name the SVN subdirectory for tags. Default "tags".
  55
  56-b <branch_subdir>::
  57        Name the SVN subdirectory for branches. Default "branches".
  58
  59-o <branch-for-HEAD>::
  60        The 'trunk' branch from SVN is imported to the 'origin' branch within
  61        the git repository. Use this option if you want to import into a
  62        different branch.
  63
  64-r::
  65        Prepend 'rX: ' to commit messages, where X is the imported
  66        subversion revision.
  67
  68-I <ignorefile_name>::
  69        Import the svn:ignore directory property to files with this
  70        name in each directory. (The Subversion and GIT ignore
  71        syntaxes are similar enough that using the Subversion patterns
  72        directly with "-I .gitignore" will almost always just work.)
  73
  74-m::
  75        Attempt to detect merges based on the commit message. This option
  76        will enable default regexes that try to capture the name source
  77        branch name from the commit message.
  78
  79-M <regex>::
  80        Attempt to detect merges based on the commit message with a custom
  81        regex. It can be used with -m to also see the default regexes.
  82        You must escape forward slashes.
  83
  84-l <max_rev>::
  85        Specify a maximum revision number to pull.
  86
  87        Formerly, this option controlled how many revisions to pull,
  88        due to SVN memory leaks. (These have been worked around.)
  89
  90-v::
  91        Verbosity: let 'svnimport' report what it is doing.
  92
  93-d::
  94        Use direct HTTP requests if possible. The "<path>" argument is used
  95        only for retrieving the SVN logs; the path to the contents is
  96        included in the SVN log.
  97
  98-D::
  99        Use direct HTTP requests if possible. The "<path>" argument is used
 100        for retrieving the logs, as well as for the contents.
 101+
 102There's no safe way to automatically find out which of these options to
 103use, so you need to try both. Usually, the one that's wrong will die
 104with a 40x error pretty quickly.
 105
 106<SVN_repository_URL>::
 107        The URL of the SVN module you want to import. For local
 108        repositories, use "file:///absolute/path".
 109+
 110If you're using the "-d" or "-D" option, this is the URL of the SVN
 111repository itself; it usually ends in "/svn".
 112
 113<path>::
 114        The path to the module you want to check out.
 115
 116-h::
 117        Print a short usage message and exit.
 118
 119OUTPUT
 120------
 121If '-v' is specified, the script reports what it is doing.
 122
 123Otherwise, success is indicated the Unix way, i.e. by simply exiting with
 124a zero exit status.
 125
 126Author
 127------
 128Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
 129various participants of the git-list <git@vger.kernel.org>.
 130
 131Based on a cvs2git script by the same author.
 132
 133Documentation
 134--------------
 135Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
 136
 137GIT
 138---
 139Part of the gitlink:git[7] suite
 140