assuming password protected svn repo with standard trunk, branches, tags setup
svn2git http://svn.example.com/path/to/repo --username [USERNAME] --verbose
After installing nirvdrum's fantastic svn2git (a fork of jcoglan's svn2git)
The verbose option is essential for password input
Now you have a pretty .git that has the branches and tags as you would expect. Double check:
# check branches
git branch
# check tags
git tag
The above would not look as you would expect with a simple git svn clone
without the svn2git script.
There are 2 more things to do (assuming you a working with a central git repo (e.g. GitHub or a GitLab install))
First add your remote (for example):
git remote add [REMOTE-NAME] git@[URL]:[PROJECT].git
(you can make up [REMOTE-NAME]
(e.g. "github"). you have to get [PROJECT]
from that central git repo)
Now push all - including branches and tags - to it
git push [REMOTE-NAME] --mirror
And that's it!
Full migration of an SVN repo and pushing the new GIT repo onto a central git so that all svn branches and tags show up as you would intuitively expect them to in GIT. (without svn2git you get all the branches and tags, but they would be difficult to find)
PS, now you can pull in new changes from svn with
svn2git --rebase
Make sure you have the svn repo in your .git/config
still
Also, make sure all new tags have been added, if not:
git show svn/tags/[TAG-NAME]
# from the above get the commit ref and log
git tag -a -m "[LOG MESSAGE]" [COMMIT REF] [TAG-NAME]