I\'m confused about what\'s the correct way to ignore the contents of a directory in git.
Assume I have the following directory structure:
my_project
To ignore everything in a directory except dotfiles you can use the following glob-pattern in your .gitignore:
.gitignore
www/[^.]*
So no need for an extra .gitignore, just simply add a .keep file to your www directory.
.keep
www