CocoaPods版本控制,在克隆仓库时必须使用pod安装 [英] CocoaPods version control, must use pod install when cloning repo
问题描述
我对使用CocoaPods和使用版本控制有疑问。我的项目在GitLab的一个仓库中。但是,如果有人想克隆该存储库并对其进行处理,则必须使用 pod install
命令。我认为,如果您将带有Pod的项目推送到存储库,则克隆时不必使用 pod install
。还是我做错了什么?当前 .gitignore
文件的外观如下:
I have a question about using CocoaPods and working with version control. I have my project on a repo at GitLab. But if someone wants to clone that repo and work on it they have to use the pod install
command. I thought that if you push you project with pods to a repo you don't have to use pod install
when cloning it. Or is it something I have done wrong? This is how the current .gitignore
file looks:
xcschememanagement.plist
Pods-AFNetworking.xcscheme
Pods.xcscheme
Breakpoints_v2.xcbkptlist
WorkspaceSettings.xcsettings
这可能是我的问题的原因吗?
Can this be the cause of the my problem?
所以我的问题是;我如何做到这一点,以使您不必在每次克隆存储库时都运行 pod install
命令,或者有可能吗?
So my question is; how do I make it so that you don't have to run the pod install
command each time you clone the repo or is this possible?
推荐答案
将 Pods
目录检入源代码控制与不执行此操作有不同的优缺点。此信息可在 Cocoapod指南的本部分。就像您已经指出的那样,好处之一是克隆存储库后不必运行 pod install
There are different pros and cons of checking the Pods
directory into source control vs not doing it. This information is available in this section of the Cocoapod guides. Like you've pointed out one benefit is not having to run pod install
after cloning the repository
这篇关于CocoaPods版本控制,在克隆仓库时必须使用pod安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!