Git ignore all folders apart from
Posted
by
digital
on Stack Overflow
See other posts from Stack Overflow
or by digital
Published on 2011-01-11T14:55:04Z
Indexed on
2011/01/11
20:53 UTC
Read the original article
Hit count: 183
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.
© Stack Overflow or respective owner