Reputation: 1884
I read many posts from StackOverflow about this, but I can't get it working in my case.
I would like to ignore all directories except for one. I added something like this to my .gitignore:
app/design/frontend/base/default/template/
!app/design/frontend/base/default/template/mymodule/
but it looks like the negation doesn't work at all.
There are many subfolders under the path app/design/frontend/base/default/template/
, and within the app/design/frontend/base/default/template/mymodule
folder there are some files if it makes any difference.
Can somebody tell me what I'm doing wrong here?
Upvotes: 2
Views: 171
Reputation: 7227
Put the whitelist item on top of the ignore item:
!app/design/frontend/base/default/template/mymodule/
app/design/frontend/base/default/template/
If that still doesn't work, you may have to include the template
directory itself, but ignore all files beneath it except mymodule
:
app/design/frontend/base/default/template/*
!app/design/frontend/base/default/template/mymodule/
For more information, see the gitignore man page.
Upvotes: 6