0

What should I put in .gitignore so that git ignores everything except JSON files (with file extension .json) anywhere in the repo (could be deep inside of some dir)?

I tried this, but it didn't work:

# Ignore everything
*

# But not .json files (including those in subdirectories)
!/**/*.json
Teddy C
  • 786
  • 10
  • 13

0 Answers0