我正在嘗試使用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