htmldrum
htmldrum

Reputation: 2449

.gitignore files not in a set

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

I want to be able to limit the filetypes commited to my compiled directory. I understand that the parser is not regex but I'd like something like this.

!src/(*.js|*.html|*.css)

Upvotes: 4

Views: 584

Answers (1)

Explosion Pills
Explosion Pills

Reputation: 191779

You can just do

src/*
!src/*.js
!src/*.css
!src/*.html

Upvotes: 6

Related Questions