[英]Clone multiple SVN projects with git-svn
I have a large Java app that is split up into multiple projects. 我有一个大型Java应用程序,分为多个项目。 Each project has its own folder in a Subversion repository like so: 每个项目在Subversion存储库中都有自己的文件夹,如下所示:
AccountingCore AccountingCore
Common 共同
WebCommon WebCommon
etc... 等等...
I want to start using git-svn locally instead of subversion. 我想开始在本地使用git-svn而不是subversion。
This may be a stupid question, but is there a way to checkout all the projects in the repository at once (including branches and all) instead checking out each project individually? 这可能是一个愚蠢的问题,但有没有办法一次性检查存储库中的所有项目 (包括分支机构和所有项目),而不是逐个检查每个项目?
Thanks, Tony 谢谢,托尼
If you have a shell, you could enter 如果你有一个shell,你可以输入
for DIR in AccountingCore Common WebCommon; do mkdir $DIR; cd $DIR; git init; git svn init -s svn://host/path/$DIR; git svn fetch; cd ..; done
That is, if I made no mistakes. 也就是说,如果我没有犯错误。
Just to improve on earlier answer, instead of 只是改进早期的答案,而不是
for DIR in AccountingCore Common WebCommon; do ...
do 做
DIRS=`svn ls svn://host/path`; for DIR in $DIRS; do ...
Yes. 是。 just checkout at the root path. 只需在根路径结帐。 If your repo is hosted here: 如果您的仓库在这里托管:
svn://host/path/AccountingCore svn://host/path/Common svn://host/path/WebCommon svn:// host / path / AccountingCore svn:// host / path / Common svn:// host / path / WebCommon
Then do your git svn
command on svn://host/path
. 然后在svn://host/path
上执行git svn
命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.