문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top