]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-svnimport.txt
Merge branches 'bf/doc' and 'db/tartree'
[thirdparty/git.git] / Documentation / git-svnimport.txt
CommitLineData
eaf718f3
MU
1git-svnimport(1)
2================
3v0.1, July 2005
4
5NAME
6----
7git-svnimport - Import a SVN repository into git
8
9
10SYNOPSIS
11--------
25f6f325 12'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]
03490804 13 [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]
2ed8e622 14 [ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]
25f6f325
MU
15 [ -s start_chg ] [ -m ] [ -M regex ]
16 <SVN_repository_URL> [ <path> ]
eaf718f3
MU
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
e72c9f5c 24SVN access is done by the SVN::Perl module.
eaf718f3
MU
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
29504118 32incremental SVN imports.
eaf718f3
MU
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
7ee74a99
MU
40-s <start_rev>::
41 Start importing at this SVN change number. The default is 1.
42+
89438677 43When importing incrementally, you might need to edit the .git/svn2git file.
7ee74a99 44
eaf718f3
MU
45-i::
46 Import-only: don't perform a checkout after importing. This option
5f3aa197 47 ensures the working directory and index remain untouched and will
eaf718f3
MU
48 not create them if they do not exist.
49
2ed8e622 50-T <trunk_subdir>::
eaf718f3 51 Name the SVN trunk. Default "trunk".
29504118 52
2ed8e622 53-t <tag_subdir>::
eaf718f3 54 Name the SVN subdirectory for tags. Default "tags".
29504118 55
eaf718f3
MU
56-b <branch_subdir>::
57 Name the SVN subdirectory for branches. Default "branches".
29504118 58
eaf718f3
MU
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
29504118 64-m::
eaf718f3 65 Attempt to detect merges based on the commit message. This option
29504118
JH
66 will enable default regexes that try to capture the name source
67 branch name from the commit message.
eaf718f3
MU
68
69-M <regex>::
70 Attempt to detect merges based on the commit message with a custom
29504118
JH
71 regex. It can be used with -m to also see the default regexes.
72 You must escape forward slashes.
eaf718f3 73
03490804
MU
74-l <max_rev>::
75 Specify a maximum revision number to pull.
3ef378a6 76
e72c9f5c
FW
77 Formerly, this option controlled how many revisions to pull,
78 due to SVN memory leaks. (These have been worked around.)
3ef378a6 79
eaf718f3
MU
80-v::
81 Verbosity: let 'svnimport' report what it is doing.
82
25f6f325
MU
83-d::
84 Use direct HTTP requests if possible. The "<path>" argument is used
85 only for retrieving the SVN logs; the path to the contents is
86 included in the SVN log.
87
88-D::
89 Use direct HTTP requests if possible. The "<path>" argument is used
90 for retrieving the logs, as well as for the contents.
91+
92There's no safe way to automatically find out which of these options to
93use, so you need to try both. Usually, the one that's wrong will die
94with a 40x error pretty quickly.
95
eaf718f3
MU
96<SVN_repository_URL>::
97 The URL of the SVN module you want to import. For local
98 repositories, use "file:///absolute/path".
25f6f325
MU
99+
100If you're using the "-d" or "-D" option, this is the URL of the SVN
101repository itself; it usually ends in "/svn".
102
e72c9f5c 103<path>::
25f6f325 104 The path to the module you want to check out.
eaf718f3
MU
105
106-h::
107 Print a short usage message and exit.
108
109OUTPUT
110------
111If '-v' is specified, the script reports what it is doing.
112
113Otherwise, success is indicated the Unix way, i.e. by simply exiting with
114a zero exit status.
115
116Author
117------
118Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
119various participants of the git-list <git@vger.kernel.org>.
120
121Based on a cvs2git script by the same author.
122
123Documentation
124--------------
125Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
126
127GIT
128---
129Part of the gitlink:git[7] suite
130