我已将文件夹 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/