-2

I have already migrated a SVN repo to git and added it to a Gerrit project.

My problem is that the SVN repo has multiple branches. How to do I migrate the branches and add them to an existing Gerrit project?

Thanks in advance!

Agi Hammerthief
  • 2,114
  • 1
  • 22
  • 38
Jomark
  • 31
  • 8

1 Answers1

1

See http://blog.jessitron.com/2013/08/converting-from-svn-to-git.html

git for-each-ref --format="%(refname:short)" refs/remotes/svn |
   sed 's#svn/##' | grep -v '^tags' |
      while read aBranch; do git branch $aBranch svn/$aBranch || exit 1; done
phd
  • 82,685
  • 13
  • 120
  • 165