Skip to content

Commit 275e910

Browse files
committed
Strip "origin/" prefix from branch name
git svn clones prefixes all SVN branch names by "origin/" in git, which is not wanted when migrating from svn to git. Hence, the prefix has to be stripped, simply in the same way it is done for tags already.
1 parent b441e68 commit 275e910

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Next, move the rest of the references under `refs/remotes` to be local branches:
8686

8787
[source,console]
8888
----
89-
$ cp -Rf .git/refs/remotes/* .git/refs/heads/
90-
$ rm -Rf .git/refs/remotes
89+
$ cp -Rf .git/refs/remotes/origin/* .git/refs/heads/
90+
$ rm -Rf .git/refs/remotes/origin
9191
----
9292

9393
Now all the old branches are real Git branches and all the old tags are real Git tags.

0 commit comments

Comments
 (0)