How to clone a nonstandard svn repo to git?

前提是你 提交于 2019-12-05 10:06:22
VonC

One interesting tool, mentioned in GitMinutes Episode 20, is SubGit, a plugin for Atalssian Stash (which isn't free, but you can try it for free).
You can know much more about SubGit in "GitMinutes #22: Alexander Kitaev about SubGit".

It is designed to managed unconventional svn repo layout.

Dmitry Pavlenko comments:

you should enter in the "Branches" field:

*:refs/heads/*;branches/*:refs/heads/branches/* 
# instead of 
branches/* 

In this case branch1 will be translated to refs/heads/branch1,
branch3 --- to refs/heads/branches/branch3.

Alternatively, if you have limited number of top-level branches, you can enumerate them explicitly:

branch1:refs/heads/branch1;
branch2:refs/heads/branch2;
branches/*:refs/heads/bra‌​nches/*

Two options come to mind:

  • Clean up your SVN repo first (Move branches below /branches, where they should be according to standard layout).
  • Checkout using standard layout, add remote branch refs later on.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!