sh 从svn迁移到git

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 从svn迁移到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

以上是关于sh 从svn迁移到git的主要内容,如果未能解决你的问题,请参考以下文章

聊聊如何从 SVN 迁移源码到 Git 仓库

从Svn到Git,5分钟迁移学习

从 SVN 迁移到 Git 存储库,其中同一项目的一部分已经发生迁移

SVN完美迁移到GIT

将特定文件夹从 SVN 迁移到 Git

如何从 designsync 迁移到 git/hg/bzr/svn?