.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "GIT-SVNIMPORT" 1 "" "" "" .SH NAME git-svnimport \- Import a SVN repository into git .SH "SYNOPSIS" .nf \fIgit\-svnimport\fR [ \-o ] [ \-h ] [ \-v ] [ \-d | \-D ] [ \-C ] [ \-i ] [ \-u ] [\-l limit_rev] [ \-b branch_subdir ] [ \-T trunk_subdir ] [ \-t tag_subdir ] [ \-s start_chg ] [ \-m ] [ \-r ] [ \-M regex ] [ \-I ] [ \-A ] [ ] .fi .SH "DESCRIPTION" Imports a SVN repository into git\&. It will either create a new repository, or incrementally import into an existing one\&. SVN access is done by the SVN::Perl module\&. git\-svnimport assumes that SVN repositories are organized into one "trunk" directory where the main development happens, "branch/FOO" directories for branches, and "/tags/FOO" directories for tags\&. Other subdirectories are ignored\&. git\-svnimport creates a file "\&.git/svn2git", which is required for incremental SVN imports\&. .SH "OPTIONS" .TP \-C The GIT repository to import to\&. If the directory doesn't exist, it will be created\&. Default is the current directory\&. .TP \-s Start importing at this SVN change number\&. The default is 1\&. When importing incrementally, you might need to edit the \&.git/svn2git file\&. .TP \-i Import\-only: don't perform a checkout after importing\&. This option ensures the working directory and index remain untouched and will not create them if they do not exist\&. .TP \-T Name the SVN trunk\&. Default "trunk"\&. .TP \-t Name the SVN subdirectory for tags\&. Default "tags"\&. .TP \-b Name the SVN subdirectory for branches\&. Default "branches"\&. .TP \-o The \fItrunk\fR branch from SVN is imported to the \fIorigin\fR branch within the git repository\&. Use this option if you want to import into a different branch\&. .TP \-r Prepend \fIrX: \fR to commit messages, where X is the imported subversion revision\&. .TP \-I Import the svn:ignore directory property to files with this name in each directory\&. (The Subversion and GIT ignore syntaxes are similar enough that using the Subversion patterns directly with "\-I \&.gitignore" will almost always just work\&.) .TP \-A Read a file with lines on the form .nf username = User's Full Name .fi and use "User's Full Name " as the GIT author and committer for Subversion commits made by "username"\&. If encountering a commit made by a user not in the list, abort\&. For convenience, this data is saved to $GIT_DIR/svn\-authors each time the \-A option is provided, and read from that same file each time git\-svnimport is run with an existing GIT repository without \-A\&. .TP \-m Attempt to detect merges based on the commit message\&. This option will enable default regexes that try to capture the name source branch name from the commit message\&. .TP \-M Attempt to detect merges based on the commit message with a custom regex\&. It can be used with \-m to also see the default regexes\&. You must escape forward slashes\&. .TP \-l Specify a maximum revision number to pull\&. .nf Formerly, this option controlled how many revisions to pull, due to SVN memory leaks\&. (These have been worked around\&.) .fi .TP \-v Verbosity: let \fIsvnimport\fR report what it is doing\&. .TP \-d Use direct HTTP requests if possible\&. The "" argument is used only for retrieving the SVN logs; the path to the contents is included in the SVN log\&. .TP \-D Use direct HTTP requests if possible\&. The "" argument is used for retrieving the logs, as well as for the contents\&. There's no safe way to automatically find out which of these options to use, so you need to try both\&. Usually, the one that's wrong will die with a 40x error pretty quickly\&. .TP The URL of the SVN module you want to import\&. For local repositories, use "file:///absolute/path"\&. If you're using the "\-d" or "\-D" option, this is the URL of the SVN repository itself; it usually ends in "/svn"\&. .TP The path to the module you want to check out\&. .TP \-h Print a short usage message and exit\&. .SH "OUTPUT" If \fI\-v\fR is specified, the script reports what it is doing\&. Otherwise, success is indicated the Unix way, i\&.e\&. by simply exiting with a zero exit status\&. .SH "AUTHOR" Written by Matthias Urlichs , with help from various participants of the git\-list \&. Based on a cvs2git script by the same author\&. .SH "DOCUMENTATION" Documentation by Matthias Urlichs \&. .SH "GIT" Part of the \fBgit\fR(7) suite