2

I have added folder android to .gitingore file, executing the following commands:

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

Folder android anyway tries to push, it's has large files and git throws error that there are files > 100 mb.

I noticed this error on MacBook, when working on my react-native project.

here's my gitignore

.expo/*
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
android/
*.orig.*
web-build/
android/
web-report/
# macOS
.DS_Store
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
Alex Khanas
  • 335
  • 1
  • 6
  • 15
  • 1
    What is the output of your `git status`? is the folder in your files list? and use this .gitignore - http://gitignore.io/api/android – CodeWizard Apr 29 '20 at 14:15
  • On branch master Untracked files: (use "git add ..." to include in what will be committed) .editorconfig .eslintrc.js .expo-shared/ .gitignore .prettierrc .watchmanconfig App.js app.json assets/ babel.config.js index.js ios/ package-lock.json package.json src/ – Alex Khanas Apr 29 '20 at 14:17

1 Answers1

2

your .gitignore file seems correct to exclude the android folder.

Maybe you have committed a large file before editing the gitignore ? if yes you can take a look on how to remove the large files from the Git History

GChevass
  • 205
  • 3
  • 9