2

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
  • 9,412
  • 6
  • 52
  • 89

1 Answers1

10

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,042
  • 19
  • 25