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 ] 13 [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_nr_changes] 14 [ -b branch_subdir ] [ -t trunk_subdir ] [ -T tag_subdir ] 15 [ -s start_chg ] [ -m ] [ -M regex ] [ <SVN_repository_URL> ] 16 17 18DESCRIPTION 19----------- 20Imports a SVN repository into git. It will either create a new 21repository, or incrementally import into an existing one. 22 23SVN access is done by the SVN:: Perl module. 24 25git-svnimport assumes that SVN repositories are organized into one 26"trunk" directory where the main development happens, "branch/FOO" 27directories for branches, and "/tags/FOO" directories for tags. 28Other subdirectories are ignored. 29 30git-svnimport creates a file ".git/svn2git", which is required for 31incremental SVN imports. 32 33OPTIONS 34------- 35-C <target-dir>:: 36 The GIT repository to import to. If the directory doesn't 37 exist, it will be created. Default is the current directory. 38 39-s <start_rev>:: 40 Start importing at this SVN change number. The default is 1. 41+ 42When importing incementally, you might need to edit the .git/svn2git file. 43 44-i:: 45 Import-only: don't perform a checkout after importing. This option 46 ensures the working directory and cache remain untouched and will 47 not create them if they do not exist. 48 49-t <trunk_subdir>:: 50 Name the SVN trunk. Default "trunk". 51 52-T <tag_subdir>:: 53 Name the SVN subdirectory for tags. Default "tags". 54 55-b <branch_subdir>:: 56 Name the SVN subdirectory for branches. Default "branches". 57 58-o <branch-for-HEAD>:: 59 The 'trunk' branch from SVN is imported to the 'origin' branch within 60 the git repository. Use this option if you want to import into a 61 different branch. 62 63-m:: 64 Attempt to detect merges based on the commit message. This option 65 will enable default regexes that try to capture the name source 66 branch name from the commit message. 67 68-M <regex>:: 69 Attempt to detect merges based on the commit message with a custom 70 regex. It can be used with -m to also see the default regexes. 71 You must escape forward slashes. 72 73-l <max_num_changes>:: 74 Limit the number of SVN changesets we pull before quitting. 75 This option is necessary because the SVN library has serious memory 76 leaks; the recommended value for nontrivial imports is 100. 77 78 git-svnimport will still exit with a zero exit code. You can check 79 the size of the file ".git/svn2git" to determine whether to call 80 the importer again. 81 82-v:: 83 Verbosity: let 'svnimport' report what it is doing. 84 85<SVN_repository_URL>:: 86 The URL of the SVN module you want to import. For local 87 repositories, use "file:///absolute/path". 88 89-h:: 90 Print a short usage message and exit. 91 92OUTPUT 93------ 94If '-v' is specified, the script reports what it is doing. 95 96Otherwise, success is indicated the Unix way, i.e. by simply exiting with 97a zero exit status. 98 99Author 100------ 101Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from 102various participants of the git-list <git@vger.kernel.org>. 103 104Based on a cvs2git script by the same author. 105 106Documentation 107-------------- 108Documentation by Matthias Urlichs <smurf@smurf.noris.de>. 109 110GIT 111--- 112Part of the gitlink:git[7] suite 113