I understand that a .gitignore file cloaks specified files from Git\'s version control. I have a project (LaTeX) that generates lots of extra files (.auth, .dvi, .pdf, logs,
A little more specific:
Example: Ignore everything in webroot/cache - but keep webroot/cache/.htaccess.
webroot/cache
webroot/cache/.htaccess
Notice the slash (/) after the cache folder:
cache
FAILS
webroot/cache* !webroot/cache/.htaccess
WORKS
webroot/cache/* !webroot/cache/.htaccess