简体   繁体   English

svn存储库中的git子目录?

[英]A git subdirectory in an svn repository?

I've got an existing project running in an SVN repository. 我有一个在SVN信息库中运行的现有项目。 I want to make use of a 3rd-party app that's hosted on github. 我想利用托管在github上的第三方应用程序。 All of my external apps I'm currently using are hosted in external SVN repositories, so I have a directory 'externals', that has 我当前使用的所有外部应用程序都托管在外部SVN存储库中,因此我有一个目录“ externals”,其中包含

$ svn pg svn:externals externals
externalApp1     http://externalApp1.googlecode.com/svn/trunk/
externalApp2     http://externalApp2.googlecode.com/svn/trunk/

Now, I want to add 'externalApp3' that's hosted on github and have a resulting dir structure like: 现在,我想添加托管在github上的'externalApp3'并具有如下的目录结构:

externals
 |- externalApp1 # svn
 |- externalApp2 # svn
  \ externalApp3 # git

Now, the kicker: I want to be able to just run 'svn-update' from the root of my repository and it to automagically do a 'git pull' on my externalApp3. 现在,更重要的是:我希望能够从存储库的根目录运行“ svn-update”,并自动对我的externalApp3进行“ git pull”。 Is this possible? 这可能吗? Are there any tools out there that would allow this? 是否有任何工具可以做到这一点?

I don't know of any tools which support combined Git/SVN repositories, but you could try just using a script: 我不知道任何支持组合的Git / SVN存储库的工具,但是您可以尝试使用脚本:

#!/bin/sh
# Name "update", call as ./update from the repository root
svn update
(cd externalApp3 && git pull)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM