我正在尝试使用svn2git将存储库从SVN迁移到GIT。这是一个开源项目,公共SVN资料库网址是:http://svn.verinice.org/svnroot/。随意测试迁移...SVN到GIT迁移失败使用svn2git
SVN仓库的结构是:
- 分支机构
- 标签
- TRUNK
我用下面的命令来克隆这种回购:
svn2git http://svn.verinice.org/svnroot
--trunk TRUNK
--branches BRANCHES
--tags TAGS
但是这个命令只能迁移一个分支而没有标签。我用这些命令检查结果:
[[email protected] git-repo]# git branch -a
* master
springy
remotes/springy
[[email protected] git-repo]# git tag -l
[[email protected] git-repo]#
如何迁移所有分支和标签? 感谢您的帮助!
UPDATE:使用参数--authors作者-file.txt的并添加姓名和电子邮件地址与git配置svn2git工作正常
后:
git config --global user.name "your name"
git config --global user.email "[email protected]"
您必须添加一个line for 每 SVN用户authors-file.txt:
svn-user-name = Full Name <[email protected]>
git branch -a and git tag -l现在会返回所有分支和标记。
+1,git-svn足以完全克隆svn回购 – 2012-03-27 17:37:32
也能正常工作。分支而不是标签是无害的 - 被接受。 – 2012-03-28 11:31:45