4

I want to modify my .gitignore so I can ignore all .jpg files which aren't in /public/assets/images.

I have tried the following:

(!/public/assets/images/)!*.jpg

/public/assets/images/!*.jpg

However besides those two I am not sure what else to try.

James Monger
  • 10,181
  • 7
  • 62
  • 98

1 Answers1

13

Try ignoring all jpg files, then explicitly unignoring /public/assets/images:

**/*.jpg
!/public/assets/images/*.jpg

The following answers explore this tangentially, and may be useful:

Community
  • 1
  • 1
roelofs
  • 2,132
  • 20
  • 25