]> git.phdru.name Git - git-scripts.git/blob - svn/README.txt
Feat(submodules/remove): Add option `-c`
[git-scripts.git] / svn / README.txt
1 Convert a Subversion repository to git
2 ======================================
3
4 These scripts are for converting a Subversion repository to git using
5 git-svn. The scripts are based on the code from the book "ProGit"
6 by Scott Chacon. I'm not sure about their legal status; I'd put them
7 into public domain.
8
9 Let's imagine you want to convert http://svn.example.org/ to git.
10
11 First, edit authors.txt. Replace my name and email with yours as the
12 ``(no author)``. You don't want me to be the committer of your null
13 commit, do you?
14
15 Run
16
17    get-authors http://svn.example.org/
18
19 Edit authors.txt again - set names and emails for committers.
20
21 Run
22
23    git2svn http://svn.example.org/ [$output_directory]
24
25 Script ``git2svn`` tries to deduce the output directory from the given
26 SVN URL by using base name of the path, but in our case there is no path
27 so you must provide the output directory:
28
29    git2svn http://svn.example.org/ example
30
31 In case of an URL like http://example.org/svn/project/ ``git2svn``
32 doesn't need the output directory.
33
34 Run
35
36    git2svn http://svn.example.org/svn/project/
37
38 and ``git2svn`` will happily convert the URL to ``project`` directory.