Skip to contentSkip to conversation

How to include just some subdirectory excluding all envelop tree

DISCUSSION Olga Pshenichnikova 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I have some tree structure:

/a
/a/a
/a/b
..
/a/z
/b
.. (thousands of folders)
/z

How can I control just /a/a folder?
What exclude file should be?

The way we use now is:

/a/*
/b/
.. (thousands of folders)
/z/
!/a/a

But it is very not nice looking and hard for maintenance...

#1 lore raw
Quoted 16 lines · Olga Pshenichnikova

I have some tree structure:

/a
/a/a
/a/b
..
/a/z
/b
.. (thousands of folders)
/z

How can I control just /a/a folder?
What exclude file should be?

The way we use now is:

Quoted 7 lines

/a/*
/b/
.. (thousands of folders)
/z/
!/a/a

But it is very not nice looking and hard for maintenance...

Don't know your usecase, but isn't it easier to just create the repository in /a/a? Then you won't have to exlude anything.

If you must, you can just use something like:

*
!/a
/a/*
!/a/a

#2 lore raw

Thank you very much!
The exclamation mark solves my problem.
I can not create repository inside /a, because I need control /b also )

Quoted 33 lines · Kevin Daudt
Quoted 16 lines · Olga Pshenichnikova

I have some tree structure:

/a
/a/a
/a/b
..
/a/z
/b
.. (thousands of folders)
/z

How can I control just /a/a folder?
What exclude file should be?

The way we use now is:

Quoted 7 lines

/a/*
/b/
.. (thousands of folders)
/z/
!/a/a

But it is very not nice looking and hard for maintenance...

Don't know your usecase, but isn't it easier to just create the repository in /a/a? Then you won't have to exlude anything.

If you must, you can just use something like:

*
!/a
/a/*
!/a/a