1GIT-SVNIMPORT(1)                  Git Manual                  GIT-SVNIMPORT(1)
2
3
4

NAME

6       git-svnimport - Import a SVN repository into git
7

SYNOPSIS

9           git-svnimport [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]
10                           [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]
11                           [ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]
12                           [ -s start_chg ] [ -m ] [ -r ] [ -M regex ]
13                           [ -I <ignorefile_name> ] [ -A <author_file> ]
14                           [ -R <repack_each_revs>] [ -P <path_from_trunk> ]
15                           <SVN_repository_URL> [ <path> ]
16

DESCRIPTION

18       Imports a SVN repository into git. It will either create a new
19       repository, or incrementally import into an existing one.
20
21       SVN access is done by the SVN::Perl module.
22
23       git-svnimport assumes that SVN repositories are organized into one
24       "trunk" directory where the main development happens, "branches/FOO"
25       directories for branches, and "/tags/FOO" directories for tags. Other
26       subdirectories are ignored.
27
28       git-svnimport creates a file ".git/svn2git", which is required for
29       incremental SVN imports.
30

OPTIONS

32       -C <target-dir>
33           The GIT repository to import to. If the directory doesn´t exist, it
34           will be created. Default is the current directory.
35
36       -s <start_rev>
37           Start importing at this SVN change number. The default is 1.
38
39           When importing incrementally, you might need to edit the
40           .git/svn2git file.
41
42       -i
43           Import-only: don´t perform a checkout after importing. This option
44           ensures the working directory and index remain untouched and will
45           not create them if they do not exist.
46
47       -T <trunk_subdir>
48           Name the SVN trunk. Default "trunk".
49
50       -t <tag_subdir>
51           Name the SVN subdirectory for tags. Default "tags".
52
53       -b <branch_subdir>
54           Name the SVN subdirectory for branches. Default "branches".
55
56       -o <branch-for-HEAD>
57           The trunk branch from SVN is imported to the origin branch within
58           the git repository. Use this option if you want to import into a
59           different branch.
60
61       -r
62           Prepend rX:  to commit messages, where X is the imported subversion
63           revision.
64
65       -u
66           Replace underscores in tag names with periods.
67
68       -I <ignorefile_name>
69           Import the svn:ignore directory property to files with this name in
70           each directory. (The Subversion and GIT ignore syntaxes are similar
71           enough that using the Subversion patterns directly with "-I
72           .gitignore" will almost always just work.)
73
74       -A <author_file>
75           Read a file with lines on the form
76
77
78
79                       username = User´s Full Name <email@addr.es>
80
81
82           and use "User´s Full Name <email@addr.es>" as the GIT author and
83           committer for Subversion commits made by "username". If
84           encountering a commit made by a user not in the list, abort.
85
86           For convenience, this data is saved to $GIT_DIR/svn-authors each
87           time the -A option is provided, and read from that same file each
88           time git-svnimport is run with an existing GIT repository without
89           -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. You
99           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, due to
105           SVN memory leaks. (These have been worked around.)
106
107       -R <repack_each_revs>
108           Specify how often git repository should be repacked.
109
110           The default value is 1000. git-svnimport will do import in chunks
111           of 1000 revisions, after each chunk git repository will be
112           repacked. To disable this behavior specify some big value here
113           which is mote than number of revisions to import.
114
115       -P <path_from_trunk>
116           Partial import of the SVN tree.
117
118           By default, the whole tree on the SVN trunk (/trunk) is imported.
119           -P my/proj will import starting only from /trunk/my/proj. This
120           option is useful when you want to import one project from a svn
121           repo which hosts multiple projects under the same trunk.
122
123       -v
124           Verbosity: let svnimport report what it is doing.
125
126       -d
127           Use direct HTTP requests if possible. The "<path>" argument is used
128           only for retrieving the SVN logs; the path to the contents is
129           included in the SVN log.
130
131       -D
132           Use direct HTTP requests if possible. The "<path>" argument is used
133           for retrieving the logs, as well as for the contents.
134
135           There´s no safe way to automatically find out which of these
136           options to use, so you need to try both. Usually, the one that´s
137           wrong will die with a 40x error pretty quickly.
138
139       <SVN_repository_URL>
140           The URL of the SVN module you want to import. For local
141           repositories, use "file:///absolute/path".
142
143           If you´re using the "-d" or "-D" option, this is the URL of the SVN
144           repository itself; it usually ends in "/svn".
145
146       <path>
147           The path to the module you want to check out.
148
149       -h
150           Print a short usage message and exit.
151

OUTPUT

153       If -v is specified, the script reports what it is doing.
154
155       Otherwise, success is indicated the Unix way, i.e. by simply exiting
156       with a zero exit status.
157

AUTHOR

159       Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
160       various participants of the git-list <git@vger.kernel.org>.
161
162       Based on a cvs2git script by the same author.
163

DOCUMENTATION

165       Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
166

GIT

168       Part of the git(7) suite
169
170
171
172
173Git 1.5.3.3                       10/09/2007                  GIT-SVNIMPORT(1)
Impressum