path: root/Documentation/git-svnimport.txt
diff options
authorMatthias Urlichs <>2005-10-10 09:40:43 (GMT)
committerMatthias Urlichs <>2005-10-10 09:40:43 (GMT)
commiteaf718f3ece277462de4e47391e5a965bbbaa297 (patch)
tree5b68436a0951be41262fe9a9b0426edaa25b5853 /Documentation/git-svnimport.txt
parent89764f5d8b0ca8600e3a200e9f863c3c7a3ff5e8 (diff)
New: git-svnimport.
As the name suggests, this script imports from SVN. Only "normal" SVN repositories (with single trunk/, branches/, and tags/ subdrectories) are supported. Incremental imports require preserving the file .git/svn2git. Signed-Off-by: Matthias Urlichs <>
Diffstat (limited to 'Documentation/git-svnimport.txt')
1 files changed, 99 insertions, 0 deletions
diff --git a/Documentation/git-svnimport.txt b/Documentation/git-svnimport.txt
new file mode 100644
index 0000000..be03a65
--- /dev/null
+++ b/Documentation/git-svnimport.txt
@@ -0,0 +1,99 @@
+v0.1, July 2005
+git-svnimport - Import a SVN repository into git
+'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
+ [ -C <GIT_repository> ] [ -i ] [ -u ]
+ [ -b branch_subdir ] [ -t trunk_subdir ] [ -T tag_subdir ]
+ [ -m ] [ -M regex ] [ <SVN_repository_URL> ]
+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.
+-C <target-dir>::
+ The GIT repository to import to. If the directory doesn't
+ exist, it will be created. Default is the current directory.
+ Import-only: don't perform a checkout after importing. This option
+ ensures the working directory and cache remain untouched and will
+ not create them if they do not exist.
+-t <trunk_subdir>::
+ Name the SVN trunk. Default "trunk".
+-T <tag_subdir>::
+ Name the SVN subdirectory for tags. Default "tags".
+-b <branch_subdir>::
+ Name the SVN subdirectory for branches. Default "branches".
+-o <branch-for-HEAD>::
+ The 'trunk' branch from SVN is imported to the 'origin' branch within
+ the git repository. Use this option if you want to import into a
+ different branch.
+ 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.
+-M <regex>::
+ 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.
+ Verbosity: let 'svnimport' report what it is doing.
+ The URL of the SVN module you want to import. For local
+ repositories, use "file:///absolute/path".
+ Print a short usage message and exit.
+If '-v' 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.
+Written by Matthias Urlichs <>, with help from
+various participants of the git-list <>.
+Based on a cvs2git script by the same author.
+Documentation by Matthias Urlichs <>.
+Part of the gitlink:git[7] suite