For certain configuration directories in my home dir, I sometimes want multiple files pushed to my dotfiles repo, but the majority of them not to be cared for (.env, .log, etc..) so I needed a way to use gitignore the opposite way: block everything and only allow some things:

# Ignore everything

# But not these files...
# etc...

# ...even if they are in subdirectories

Thanks stackoverflow

Blog Logo

Mario Loria




Because gets old after a while.

Back to Overview