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,
This is how I did it:
# Ignore everything
*
# Whitelist anything that's a directory
!*/
# Whitelist some files
!.gitignore
# Whitelist this folder and everything inside of it
!wordpress/wp-content/themes/my-theme/**
# Ignore this folder inside that folder
wordpress/wp-content/themes/my-theme/node_modules
# Ignore this file recursively
**/.DS_Store
Use gig status -u
to view individual files in untracked directories recursively - with git status
you'd only see folders, which could fool you into thinking that everything inside them was tracked