forked from cosmin/git-svn-extensions
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
67 lines (45 loc) · 2.17 KB
/
README
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
Author: Cosmin Stejerean (offbytwo), Sergiu Dumitriu (sdumitriu)
License: MIT
Description: git-svn-extensions are a set of shell scripts that make it easier
to work with subversion from git.
* Installation *
The current extensions are written as a set of bash functions. Simply add the
following line to your .bashrc, .bash_profile or similar to take advantage of
these features:
. /path/to/this/project/source.sh
* Usage *
- creating a subversion branch or tag
$ git-svn-create-branch branch_name
$ git-svn-create-tag tag_name
This will create a branch in svn with that name, starting from the currently
tracked remote (trunk or a svn branch), and check it out locally as
svn-branch_name
The tag creation does the same, with the differences that it aborts if the
local branch contains unmerged changes, and at the end it does not checkout
the remote tag into a new local branch, since tags are not normally edited.
- deleting a subversion branch or tag
$ git-svn-delete-branch branch_name
$ git-svn-delete-tag tag_name
By default this only shows what would be deleted (dry run). Append -f to
actually delete.
- removing references to remote branches and tags that no longer exist in svn
$ git-svn-prune-branches
$ git-svn-prune-tags
By default this only shows what would be deleted (dry run). Append -f to
actually delete.
- list svn branches or tags (excluding trunk)
$ git-svn-branches
$ git-svn-tags
- show the current local and remote branch names
$ git-current-branch
$ git-current-remote-branch
The latter correctly detects if the local branch tracks the trunk, a branch,
or a tag. Append -s to only print the name of the branch/tag, or "trunk"
instead of the user-friendly message.
- full conversion of a subversion project into a (local) git repository
$ git-svn-migrate
This function is interactive, prompting for the needed information. The new
git repository does not maintain the connection to the SVN one. This is useful
for fully migrating a project from subversion to git, a one-time process that
preserves the entire history of the project (as much as git-svn can obtain,
anyway), including existing tags and branches.