Reputation: 2139
I want to ignore all the files in my folder structure apart from the following conditions:
profiles (and all folders/files recursive)
sites/xxx (and all folders/files recursive)
Currently my gitignore file looks like:
`*`
!sites/xxx
!sites/xxx/modules
!sites/xxx/modules/*
!profiles
!profiles/xxx
!profiles/xxx/*
This doesn't allow me to track sites/xxx/modules/new though, is there anyway round this.
Upvotes: 1
Views: 563
Reputation: 38118
Without looking at the manual, I have a vague memory that .gitignore
is processed in order, and so the !
lines should come before *
.
Upvotes: 1