I'm trying to figure out a rule for .gitignore file to only keep track of my dotfiles.
I've tried combinations of !.* and !^.* used after * and also [^.]* as advised here. None of those ignored all of the visible, non dotfiles. What am I missing?
Try
*
!/**/
!.*
Ignore everything, unignore all directories, unignore dotfiles.
* ignores everything!.* except dot files!.*/** except any files inside dot files*
!.*
!.*/**
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With