Git: exclude folder but include subfolder
up vote
0
down vote
favorite
I read this link: https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder/5534865#5534865
But this is use-case when git fails without any clue:
*
!abc
abc/def/*
!abc/def/mng
abc/def/mng/*
!abc/def/mng/qka
abc/def/mng/qka/*
!abc/def/mng/qka
abc/def/mng/qka/xyz/*
git can be able to add files till it reach level 4 subfolder abc/def/mng/qka/xyz
, everything under abc/def/mng/qka/xyz
can't be added to git repo, I have no clue why, I cat "hello" >> abc/def/mng/qka/xyz/test
and try to include it !abc/def/mng/qka/xyz/test
, don't see it in git add .; git status
command-line git
add a comment |
up vote
0
down vote
favorite
I read this link: https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder/5534865#5534865
But this is use-case when git fails without any clue:
*
!abc
abc/def/*
!abc/def/mng
abc/def/mng/*
!abc/def/mng/qka
abc/def/mng/qka/*
!abc/def/mng/qka
abc/def/mng/qka/xyz/*
git can be able to add files till it reach level 4 subfolder abc/def/mng/qka/xyz
, everything under abc/def/mng/qka/xyz
can't be added to git repo, I have no clue why, I cat "hello" >> abc/def/mng/qka/xyz/test
and try to include it !abc/def/mng/qka/xyz/test
, don't see it in git add .; git status
command-line git
Like mention in comment of this question, I mistakenly see something as file but actually a folder and need an extra exclude to work: unix.stackexchange.com/q/485632/256195
– Tuyen Pham
Dec 3 at 14:10
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I read this link: https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder/5534865#5534865
But this is use-case when git fails without any clue:
*
!abc
abc/def/*
!abc/def/mng
abc/def/mng/*
!abc/def/mng/qka
abc/def/mng/qka/*
!abc/def/mng/qka
abc/def/mng/qka/xyz/*
git can be able to add files till it reach level 4 subfolder abc/def/mng/qka/xyz
, everything under abc/def/mng/qka/xyz
can't be added to git repo, I have no clue why, I cat "hello" >> abc/def/mng/qka/xyz/test
and try to include it !abc/def/mng/qka/xyz/test
, don't see it in git add .; git status
command-line git
I read this link: https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder/5534865#5534865
But this is use-case when git fails without any clue:
*
!abc
abc/def/*
!abc/def/mng
abc/def/mng/*
!abc/def/mng/qka
abc/def/mng/qka/*
!abc/def/mng/qka
abc/def/mng/qka/xyz/*
git can be able to add files till it reach level 4 subfolder abc/def/mng/qka/xyz
, everything under abc/def/mng/qka/xyz
can't be added to git repo, I have no clue why, I cat "hello" >> abc/def/mng/qka/xyz/test
and try to include it !abc/def/mng/qka/xyz/test
, don't see it in git add .; git status
command-line git
command-line git
asked Dec 3 at 8:25
Tuyen Pham
537113
537113
Like mention in comment of this question, I mistakenly see something as file but actually a folder and need an extra exclude to work: unix.stackexchange.com/q/485632/256195
– Tuyen Pham
Dec 3 at 14:10
add a comment |
Like mention in comment of this question, I mistakenly see something as file but actually a folder and need an extra exclude to work: unix.stackexchange.com/q/485632/256195
– Tuyen Pham
Dec 3 at 14:10
Like mention in comment of this question, I mistakenly see something as file but actually a folder and need an extra exclude to work: unix.stackexchange.com/q/485632/256195
– Tuyen Pham
Dec 3 at 14:10
Like mention in comment of this question, I mistakenly see something as file but actually a folder and need an extra exclude to work: unix.stackexchange.com/q/485632/256195
– Tuyen Pham
Dec 3 at 14:10
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485633%2fgit-exclude-folder-but-include-subfolder%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Like mention in comment of this question, I mistakenly see something as file but actually a folder and need an extra exclude to work: unix.stackexchange.com/q/485632/256195
– Tuyen Pham
Dec 3 at 14:10