I have the following structure:
public/
- uploads/
- cover-photos/
- thumbnail/
- profile-photos/
- original/
- thumbnail/
I would like to push those directories without any content in the server, so I tried to accomplish that by adding an empty .gitkeep file in each of those directories and used the following code:
/public/uploads/cover-photos/thumbnail/*
!/public/uploads/cover-photos/thumbnail/.gitkeep
/public/uploads/profile-photos/original/*
!/public/uploads/profile-photos/original/.gitkeep
/public/uploads/profile-photos/thumbnail/*
!/public/uploads/profile-photos/thumbnail/.gitkeep
This works fine only for the child directories, thumbnail and original. If I add any file there, git will ignore those, but if I add a file in (for example) /public/uploads/cover-photos/ then git will track it and push it. How can i achieve what I want for the rest of the directories?