forked from nrvnm/jkl-pages
-
Notifications
You must be signed in to change notification settings - Fork 5
/
howto.html
90 lines (52 loc) · 3.19 KB
/
howto.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
layout: documentation
subtitle: SVN to Git Quick How-To
---
<div class="wrapper">
{% capture content %}
### How to set up Git/SVN Mirror
This is a quick how-to on how to set up Git/SVN mirror. It will be sufficient to follow steps below for most of the standard SVN repositories to create a writable Git mirror of SVN project.
For more comprehensive documentation refer to [SubGit Book](remote-book.html).
##### Table of Contents
##### 1. [Configure Mirror Git Repository](#configure)
##### 2. [Review and Adjust Git/SVN Mirror Configuration](#review)
##### 3. [Perform Initial Translation](#initial)
##### 4. [System Requirements](#requirements)
##### 5. [SubGit with GitLab](#gitlab)
##### 6. [Moving Git Repository](#move)
##### 7. [Get Support](#support)
##### 1. Configure Mirror Git Repository<a name="configure"></a>
Run the following command to configure Git repository to mirror SVN project:
$ subgit configure --layout auto SVN_PROJECT_URL repos.git
Above command will detect branches layout in the SVN project and then will create empty [bare](http://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/) Git repository ready to mirror SVN project.
You may be asked for credentials unless those are already stored in the SVN credentials cache at ~/.subversion directory.
To get help on any of the SubGit commands run:
$ subgit help COMMAND_NAME
e.g.
$ subgit help configure
##### 2. Review and Adjust Git/SVN Mirror Configuration<a name="review"></a>
Review and adjust branches mapping configuration:
$ edit repos.git/subgit/config
Review and adjust Git/SVN authors mapping:
$ edit repos.git/subgit/authors.txt
You may use dynamic authors mapping replacing authors.txt with a script. Script sample could be found at repos.git/subgit/samples directory.
##### 3. Perform Initial Translation<a name="initial"></a>
Run the following command to enalbe mirror and translate SVN revisions to Git commits:
$ subgit install repos.git
As soon as initial translation is completed, repos.git is ready to serve users.
Pushes to repos.git will be translated to SVN and commits to SVN will be translated to Git.
There are many ways to make Git repository available to the users (see [Git on the Server](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols)), including SSH access, Apache Web Server, GitLab, etc.
##### 4. System Requirements<a name="requirements"></a>
We test SubGit on Linux, Windows and OS X. JDK 1.7 or newer is required. SVN servers 1.4 or newer are supported.
##### 5. SubGit with GitLab<a name="gitlab"></a>
If you're using [GitLab](http://gitlab.com/) refer to [GitLab How-to](gitlab.html) for more information on how to set up SubGit to work seamlessly with GitLab.
##### 6. Moving Git Repository<a name="move"></a>
Would you need to move Git repository in filesystem, you'd need to shutdown sync before move and enable it back after repository has been moved:
$ subgit shutdown repos.git
$ mv repos.git repos2.git
$ subgit install repos2.git
##### 7. Get Support<a name="support"></a>
For support feel free to contact us at [support@subgit.com](mailto:support@subgit.com). We are ready to help!
{% endcapture %}
{{ content | markdownify }}
</div>