android - Gitignore 不会忽略文件夹 android,react native

标签 android git react-native gitignore

我已将文件夹 android 添加到 .gitingore 文件中,执行以下命令:

git rm -rf --cached . 
git add .
git commit -m "git"
git push origin master

Android 文件夹无论如何都会尝试推送,它有大文件,并且 git 会抛出错误,指出文件大小 > 100 mb。

在处理我的 React-Native 项目时,我在 MacBook 上注意到了这个错误。

这是我的 gitignore

.expo/*
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
android/
*.orig.*
web-build/
android/
web-report/
# macOS
.DS_Store

最佳答案

您的 .gitignore 文件似乎正确排除了 android 文件夹。

也许您在编辑 gitignore 之前提交了一个大文件?如果是的话,您可以看看如何 remove the large files from the Git History

关于android - Gitignore 不会忽略文件夹 android,react native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61503839/

相关文章:

android - Android计算器应用程序: Unfortunately application has stopped [closed]

java - 通过 AdapterPosition 获取 RecyclerView 的 View

android - 在 Android 上获取指向屏幕键盘 View 的指针

Git merge 和推送

javascript - 更改另一个组件中的状态

android-studio - 运行 react-native run-android 时无法提取 textlayoutbuilder-1.0.0.aa

android - org.apache.http编译错误

php - 使用Git和Composer处理PHP框架的组件之间的依赖关系的最佳方法

git - 将整个git分支重新设置为孤立分支,同时保持提交树完整

javascript - .map 第二个参数是当前值而不是索引