[英]How do I convert my SVN repository to Git while preserving branches?
Some help please. 请帮忙。 This doesn't seem to do it for me:
这似乎不适合我:
git svn clone --stdlayout --authors-file=../authors.txt file:///home/path
The simplest way is to use svn2git , a ruby script that handles all of that for you. 最简单的方法是使用svn2git ,这是一个ruby脚本,可以为您处理所有这些。 I've used it over the past 8 months or so to convert several quite large subversion repos to git;
我在过去的8个月左右用它来将几个相当大的颠覆回购转换为git; it's by far the best tool I've found for the job.
它是迄今为止我找到的最好的工具。
有一个非常完善的一套可用指令在这里 ,包括如何SVN“标签”和“分支”转化为实际的Git标签和分支。
I have had great luck with specifying the branches and tags explicitly: 我非常幸运地明确指定了分支和标签:
git svn clone http://server.com/svn/project -T trunk -b branches -t tags project
git remote add origin git@server.com:project
git push origin master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.