1

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?

Ankur S
  • 548
  • 3
  • 18
  • 2
    I think your question is really similar to this one. https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder – Jiajie Xu Jul 07 '18 at 12:40
  • but it doesnt answer how to disable certain rules in certain folders which is really what i want to ask – Ankur S Jul 07 '18 at 12:44
  • I just tried and it worked for me. I have git version 2.13.3 – Manuel Schmidt Jul 07 '18 at 17:29
  • Possible duplicate of [.gitignore exclude folder but include specific subfolder](https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder) – evolutionxbox Jul 07 '18 at 23:35

1 Answers1

1

Could you try this

*.png
!results/*.png 
Mamtha Soni K
  • 895
  • 6
  • 9