Ankur S
Ankur S

Reputation: 588

Exclude folder from .gitignore rule

I have a project where I want to exclude all the pesky *.png files but still want to include the when they are in a specific folder. Essentially, I want to not apply the *.png rule in this folder. My first attempt did not work.

*.png
!results/*

Precisely, how to disable certain rules in certain folders?

Upvotes: 1

Views: 1072

Answers (1)

Mamtha Soni K
Mamtha Soni K

Reputation: 965

Could you try this

*.png
!results/*.png 

Upvotes: 1

Related Questions