我们应该将pod文件提交到版本控制系统(GIT或SVN)吗? [英] Should we commit pod files to version control system (GIT or SVN)

查看:645
本文介绍了我们应该将pod文件提交到版本控制系统(GIT或SVN)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我正在开发一个应用程序,我的团队负责人表示不提交pod文件,我只是按照他的指示操作。

So far I was working on an app and my Team Lead said not to commit the pod files and I just followed his instructions.

然后我们的Lead发生了变化,他说要将pod文件提交给Git。所以我很困惑哪一个。

Then our Lead changed and he said to commit the pod file to Git. So I was confused which one to go with.

我们是否应该提交pod文件,如果我们不应该提交原因。请帮我澄清这件事,因为我也阅读了一些文章,但没有找到任何满意的答案。

Should we commit the pod file or not and if we should not then why. Please help me clear on this thing as I went through some articles as well but didn't find any satisfactory answer.

推荐答案

是否或者不是您在Pods文件夹中签入由您决定,因为工作流程因项目而异。建议建议将Pods目录保留在源代码管理下。


检查Pods目录的好处

Whether or not you check in your Pods folder is up to you, as workflows vary from project to project. It is recommended that you keep the Pods directory under source control.

Benefits of checking in the Pods directory


  1. 克隆回购后,即使没有在机器上安装CocoaPods,项目也可以立即构建和运行。无需运行pod安装,也无需Internet连接。

  2. Pod工件(代码/库)始终可用,即使Pod的来源(例如GitHub)将会崩溃。

  3. 克隆回购后,Pod工件保证与原始安装中的工件相同。

忽略Pods目录的好处


  1. 源代码控制仓库将更小并占用更少的空间。

  2. 只要所有Pod的源(例如GitHub)可用,CocoaPods通常能够重新创建相同的安装。 (从技术上讲,无法保证在Podfile中不使用提交SHA时运行pod安装将获取并重新创建相同的工件。在Podfile中使用zip文件时尤其如此。)

3.执行源代码控制操作时不会有任何冲突,例如合并具有不同Pod版本的分支。

3.There won't be any conflicts to deal with when performing source control operations, such as merging branches with different Pod versions.

资料来源: Cocoapods

这篇关于我们应该将pod文件提交到版本控制系统(GIT或SVN)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆