What is the correct way to make the remote branches/tags that exist after a git-svn init/git-svn fetch into local Git branches/tags before pushing to my remote Git repo and
For a one-shot operation like this, before leaving behind a SVN repo, I like to clone it using the ruby script svn2git
=== Examples
Say I have this code in svn:
trunk
...
branches
1.x
2.x
tags
1.0.0
1.0.1
1.0.2
1.1.0
2.0.0
git-svn
will go through the commit history to build a new git repo.
It will import all branches and tags as remote svn branches, whereas what you really want is git-native local branches and git tag objects.
So after importing this project I'll get:
$ git branch
* master
$ git branch -a
* master
1.x
2.x
tags/1.0.0
tags/1.0.1
tags/1.0.2
tags/1.1.0
tags/2.0.0
trunk
$ git tag -l
[ empty ]
After
svn2git
is done with your project, you'll get this instead:
$ git branch
* master
1.x
2.x
$ git tag -l
1.0.0
1.0.1
1.0.2
1.1.0
2.0.0