How to define in gitignore to ignore all except one file extension?
So I just want to track one file extensions.
I try something like this -> !*.sql
but this not working.
Read here: https://git-scm.com/docs/gitignore
"An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again"
As said, you have to exclude everything first (with pattern '*') , then include some patterns again (your desired '!*.sql').
Tnx!
It works!
It looks like you're new here. Sign in or register to get started.