-1

I'm creating an API with a directory to store data. Within the directory there are subdirectories like .data/customers and .data/transactions. Within these subfolders are .json files to store data.

I want to maintain the structure of the directories while ignoring the .json files.

Currently, my .gitignore file looks like this .data/**/*.json but this ignores all of the directories as well as the files.

How can I setup my .gitignore to only ignore the files?

1 Answers1

-1

I put a .gitignore file in each subdirectory with *.json and that gave the desired result. I wish there was a more elegant way to do this.