Best way to import a svn repo to git that has trunk, tags, branches and releases

狂风中的少年 提交于 2019-12-12 05:25:01

问题


I run a project on sourceforge called mqmanager.NET that I inherited from the original author. Long story short I want to migrate this, and the rest of, my sourceforge projects to github. The problem here is that the typical import process assumes you have trunk, tags, and branches. I have these plus a releases folder. The particular command I am currently using is:

git.exe svn clone "https://mqmanager.svn.sourceforge.net/svnroot/mqmanager"  "C:\src\mqmanager" -T trunk -b branches -t tags

Now, I'm mainly concerned by trunk and releases, but I'd like to keep everything. Is there another version of the command I should be using?


回答1:


From TFM:

You can specify more than one --tags and/or --branches options, in case your Subversion repository places tags or branches under multiple paths.

If releases should be turned into git tags, then you could say

git svn clone <url> <local> -T trunk -b branches -t tags -t releases


来源:https://stackoverflow.com/questions/1727076/best-way-to-import-a-svn-repo-to-git-that-has-trunk-tags-branches-and-releases

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!