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-fil开发者_开发知识库e=../authors.txt file:///home/path
The simplest way is to use svn2git, a ruby script that handles all of that for you. I've used it over the past 8 months or so to convert several quite large subversion repos to git; it's by far the best tool I've found for the job.
There's a pretty thorough set of instructions available here, including how to convert SVN "tags" and "branches" into actual Git tags and branches.
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
I would try to clone your SVN with SmartGit: it translates such SVN concepts like branches, tags, ignores, EOLs to the corresponding Git concepts.
Maybe I will find an easy Howto....
精彩评论