I have an android project that has a test module that will remove and recreate .apk files in a subdirectory in the git directory.
I have added these to .gitignore (the directory, the files explicitly, and *.apk ) and then I have done
git rm -r --cached src/main/Tests/bin
and git tells me:
rm 'src/main/Tests/bin/Tests-debug-unaligned.apk'
rm 'src/main/Tests/bin/Tests-debug.apk'
rm 'src/main/Tests/bin/Tests.ap_'
rm 'src/main/Tests/bin/classes.dex'
i then
git commit . -m "removed apk files"
I run the tests again which delete the files and the recreate them. I run git status and they show up as modified. It seems .gitignore is not working. Here is my .gitignore file
*ipr
*iml
*iws
.gitignore
out/
*apk
src/main/Tests/bin
src/main/Tests/bin/*
src/main/Tests/bin/Tests-debug-unaligned.apk
I think you need to clean all your stagged files using:
git rm -r --cached .
git add -A
Then commit:
git commit -m ".gitignore"
But make sure you commit your changes before doing this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With