How can I add an empty directory (that contains no files) to a Git repository?
When you add a .gitignore file, if you are going to put any amount of content in it (that you want Git to ignore) you might want to add a single line with just an asterisk * to make sure you don't add the ignored content accidentally.
.gitignore
*