I've recently started using Git and am having trouble with just one thing. How can I track directories without tracking their contents?
For example the site I'm working on allows uploads. I want to track the uploads directory so that it is created when branching, etc. but obviously not the files within it (test files whilst in develop branch or the real files in master).
In my .gitignore I have the following:
uploads/*.*
Have also tried (which ignores the whole directory):
uploads/
This directory may also contain sub directories (uploads/thumbs/ uploads/videos/) I would like to be able to track these but not their files.
Is this possible with Git? I've searched everywhere without finding an answer.