1

I'm writing a an app that generates it's own json. I want it to ship with an example json file but to ignore all new files added by developers who use it.

To be specific I have folder json which I want to ignore with a single file json/0.json which I want committed.

What's the best way to do this?

Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225

1 Answers1

1

You can add in gitignore

json/

for ignoring the folder, and then forcing to add the file

git add --force json/0.json
Jepessen
  • 11,744
  • 14
  • 82
  • 149