How to track directories but not their files with Git?
Git doesn’t track directories, it tracks files, so to acheive this you need to track at least one file. So assuming your .gitignore file looks something like this: upload/* You can do this: $ touch upload/.placeholder $ git add -f upload/.placeholder If you forget the -f you’ll see: $ git add upload/.placeholder The following paths … Read more