Gitignore不忽略android文件夹,本机反应

时间:2020-04-29 14:10:35

标签: android git react-native react-native-android gitignore

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

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

文件夹android无论如何都会尝试推送,它有大文件,并且git抛出错误,提示文件大于100 mb。

当我处理本机项目时,我在MacBook上注意到此错误。

这是我的gitignore

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

1 个答案:

答案 0 :(得分:1)

您的.gitignore文件似乎正确,可以排除android文件夹。

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