I have data directory in project's root. It has images directory and some files. Here is example:
data
├── images
│ ├── image1.jpg
│ ├── image2.jpg
│ └── image3.jpg
├── results.csv
└── r.txt
What to write in gitignore, to ignore files from data/ directory (that is results.csv and r.txt) and files from images/ directory (image.jpg, image2.jpg, image3.jpg)?
When I commit it, folder structure in repository should be:
data/
└── images/
So, I just want empty folder structure to be commited.
Just add a file .gitkeep
in every folder you want committed.
On windows do so by right clicking when in the folder and select: Git bash from here. Then type: touch .gitkeep