f-angi
1/27/2017 - 4:03 PM

Migrating from svn to git

Migrating from svn to git

# http://www.sailmaker.co.uk/blog/2013/05/05/migrating-from-svn-to-git-preserving-branches-and-tags-3/

$ git svn init http://sources.intesys.it/svn/ARAG_2014_ESA_Restyling_Web/ --stdlayout
$ git svn fetch
$ ./gitTags.sh
$ git remote add gitlab git@gitlab.intesys.it:tech/arag_www.git
$ git push gitlab
$ git push --tags gitlab
$ git push --set-upstream gitlab master
for tag in `git branch -r | grep "tags/" | sed 's/origin\/tags\/\(.*\)\@*.*$/\1/'`; do
    if [[ $tag != *"@"* ]]; then
        git tag -a -m"Converting SVN tags" $tag
    fi
done