.gitignore files are not in a set

Is there a way to limit the file types tracked by git by specifying a set of valid file types in .gitignore?

I want to be able to limit the types of files that were sent to my compiled directory. I understand that the parser is not a regular expression, but I would like something like this.

!src/(*.js|*.html|*.css) 
+4
source share
1 answer

You can just do

 src/* !src/*.js !src/*.css !src/*.html 
+6
source

All Articles