最佳方法:在Github上同步Pod文件是否是一种好方法 [英] Best approach : Is it good approach to sync pods file on Github

查看:92
本文介绍了最佳方法:在Github上同步Pod文件是否是一种好方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一些与pod集成的框架。所以我想问一问这种在gitHub上同步这些框架的好方法。例如 。在我的iOS项目中,我已经集成了GoogleMap框架,应该在Github上同步还是应该参考一下。我之所以这样问是因为,当我提交此框架时,它会给我带来内存问题。

I am using some framework which are integrated with pods . So I want to ask is this good approach to sync these framework on gitHub . For example . In my iOS project I have integrated GoogleMap framework, Should I sync this on Github or i should some reference . I am asking this because When i commit this framework it give me memory issues.

推荐答案

我会说没有最佳方法 ,了解有关Pod依赖项应忽略的内容。

I'd say there's no "best approach" about what should be ignored concerning your pods dependencies.

一个人会说最好是忽略pods目录以保持git存储库的轻巧,但是对于其他人来说,您的pod依赖关系是应用程序的一部分,没有它,它就无法构建,因此您必须提交它。

One would say that it's better to ignore the pods directory to keep your git repository light, but for someone else would say that your pods dependencies are part and parcel of your app, it won't build without it, so you must commit it.

首先,我选择将所有pod都包含在git repo中,但我很快注意到它可以十分烦人,因为每次您更新一个依赖项时,都会炸毁更新的提交文件列表。现在,我只包含Podfile和Podfile.lock文件,而忽略Pods存储库。 只需确保每次从存储库中提取时都运行pod安装

First I chose to include all my pods in my git repo, but I quickly noted that it could be very annoying, given that each time you update one of your dependencies it blows yp your updated commit files list. Now I just include my Podfile and Podfile.lock files and ignore the Pods repository. Just make sure to run pod install each time you pull from the repo.

包括所有Pod的主要好处是拥有您的项目准备就绪,无需先在计算机上安装CocoaPods即可构建它。

The main benefit of including all your Pods is to have your project "ready to build", without the need to have CocoaPods installed on your computer to build it first.

有关更多详细信息,请参见以下相关问题:
<一个href = https://stackoverflow.com/questions/9446644/what-goes-into-your-gitignore-if-youre-using-cocoapods>如果您使用CocoaPods,您的.gitignore中会出现什么?

For more details, see this related question : What goes into your .gitignore if you're using CocoaPods?

这篇关于最佳方法:在Github上同步Pod文件是否是一种好方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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