Gitignore Directory Contents
git
You may need to gitignore the contents of a directory, whilst including the empty directory in version control.
For example, you have a config directory that contains config files that are app specific. It may useful to include the config directory, so you can easily see where to place config files.
To achive this, add a .gitkeep file to the directory. Then in the repository’s .gitignore file:
config/*
# exception to the rule
!config/.gitkeepcomments powered by Disqus