简体   繁体   English

Git子模块自动推送

[英]Git Submodule Automatic Push

Let me explain my (potentially incorrect) thought process before I get into the details. 在详细介绍之前,让我解释一下我的(可能不正确的)思考过程。

We have a very large repo that contains many uncompiled libraries that developers are working on regularly. 我们有一个非常大的存储库,其中包含许多开发人员经常使用的未编译的库。 We have a script to build all of these libraries that are outputted into a folder name Published I'd like to have this Published directory as a submodule so I've set that up I'd like to have the process be: 我们有一个脚本来构建所有这些库,这些库将输出到一个名为“已Published的文件夹中。我想将此已Published目录作为子模块,因此我将其设置为:

sh BuildLibraries.sh`
git add . //add modified (the new libraries) 
git commit -m "Rebuilt Libraries"
git push

but this doesn't work with submodules, because they are their own repository. 但这不适用于子模块,因为它们是它们自己的存储库。 Perhaps submodules is not what I want, what else can I do? 也许子模块不是我想要的,我还能做什么? can I make this work cleanly with submodules? 我可以使用子模块使它正常工作吗?

The reason I want these in a separate repo in the first place is we are using cocoapods in an iOS project to use these libraries as dependancies but using the main repo takes WAY to log for cocoapods to "pre-download" the repo. 首先要在单独的存储库中使用这些代码的原因是,我们在iOS项目中使用cocoapods将这些库用作依赖项,但使用主存储库则需要通过方式记录cocoapods以“预下载”该存储库。 We've tried using an orphan branch, but it still downloads the whole repo first. 我们已经尝试过使用一个孤立分支,但是它仍然会首先下载整个仓库。 I'll tag cocoapods in case, some one else had this issue. 我会标记可可足类,以防其他人遇到此问题。

Thank you for all and any help! 感谢您的所有帮助!

您所要做的就是将CD放入存储库,这就是子模块的全部。

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

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