Skip to content

Commit fe9a85e

Browse files
committed
How to deal with peg-revisions
It is not a fault that peg-revisions will result in multiple branches when migrating svn to git.
1 parent b441e68 commit fe9a85e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

book/09-git-and-other-scms/sections/import-svn.asc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ $ cp -Rf .git/refs/remotes/* .git/refs/heads/
9090
$ rm -Rf .git/refs/remotes
9191
----
9292

93+
It may happen that a branch is created *multiply*, suffixed by `@xxx` (where xxx is a number), while in svn you only see *one* branch. This is not a fault, but actually the solution to keep so-called "peg-revisions", which is a feature of svn that git simply has no syntactical counterpart for. Hence, `git svn` simply adds the svn version number to the branch name just in the same way as you would have written it in svn to address the peg-revision of that branch. If you do not care anymore about that peg-revisions, simply remove them using `git branch -d`.
94+
9395
Now all the old branches are real Git branches and all the old tags are real Git tags.
9496
The last thing to do is add your new Git server as a remote and push to it.
9597
Here is an example of adding your server as a remote:

0 commit comments

Comments
 (0)