2

In my repository I want to exclude all the binary files, all the generated files etc. But I do want to include the final apk file. I picked up the standard gitignore for android(see here) and changed it according to this question. But now it is not ignoring the bin/res folder. Of course I can add another line to manually exclude bin/res also but that does not seem standard. How do I do this?

Community
  • 1
  • 1
prongs
  • 9,422
  • 21
  • 67
  • 105

1 Answers1

1

If the apk file is only present in the bin/ directory, you could try:

bin/
!*.apk

This would be similar to the setting described in "How do gitignore exclusion rules actually work?".

What you tried is similar to "How do negated patterns work in .gitignore?", and this might work:

bin/*
!bin/*.apk
bin/res/
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250