git - 无法推送 github 大小限制
问题描述
我使用 Cocoapods 安装了 GoogleMaps pod。我尝试提交我的更改并推送到 github。然后弹出大小限制错误,我知道我必须将 GoogleMaps 文件夹保留在 gitignore 文件中。
我添加到我的 .gitignore 文件中:
Pods/GoogleMaps/
在终端:
git rm -r --cached .
git add .
如果我尝试查看 GoogleMaps 文件夹是否被忽略,我会得到以下信息:
git check-ignore -v Pods/GoogleMaps
.gitignore:1:Pods/GoogleMaps/ Pods/GoogleMaps
如果我尝试推到原点:
remote: error: Trace: c08289a82c9c540047ad0d396caa72f8f143a62e098c82c96a7de884eddf7c59
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework/GoogleMapsCore is 134.89 MB; this exceeds GitHub's file size limit of 100.00 MB
大小限制也有同样的问题。有谁知道我该如何解决这个问题?
编辑:
我试过了
git rm --cached Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework/GoogleMapsCore
我得到:
fatal: specified route 'Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework/GoogleMapsCore' folder not found
编辑2:
我做了 git reset 到我添加这些文件的提交。删除它们并提交。关于大小限制的相同消息。我不明白为什么我在上次提交之前删除了文件。
解决方案
你可以试试这个:git reset HEAD Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework/GoogleMapsCore
?
推荐阅读
- python - 如何将链接图像嵌入到 python 电子邮件中
- javascript - 如果选中复选框,则相应的按钮应更改颜色
- c# - Asp Net web api 2 响应缓存(服务器端)
- unity3d - 为什么导航网格从不工作?单击烘焙后我看不到蓝色路径
- excel - 如何将格式化文本从 Word 传输到 Excel?
- javascript - 当我尝试使用谷歌助手时,将上下文从一个意图传递到另一个意图时获取“空”上下文
- angular - Angular 2+如何通过兄弟组件中的mouseleave事件触发切换指令
- python - 如何使用 Tkinter 创建 GUI?(苹果系统)
- git - 仅将分支中的最后一次提交合并到 master
- angular - Angular:为什么单击保存按钮时会自动导航