I want to include all the *.meta files in the Assets directory and all subdirectories while excluding everything else in Assets
I tried
/Assets/*
!/Assets/**/*.meta
!*.meta
but that only include *.meta within /Assets ????
Thanks for any help
I want to include all the *.meta files in the Assets directory and all subdirectories while excluding everything else in Assets
I tried
/Assets/*
!/Assets/**/*.meta
!*.meta
but that only include *.meta within /Assets ????
Thanks for any help
First, if an ignore rule does not work, you can check this with
git check-ignore
:It will display which ignore rule ignore a file that you thought should not be ignored.
Then the main rule to remember when it comes to ignore is:
That is why your rules only include
*.meta
within/Assets
(and not the subdirectories)You would need to include all parent folders of a file (as in this recent example) in order to include a file
I tested it with git 2.4.1 and it works (even on Windows).
It does include only the
*.meta
files inAssets
and all subdirectories, but exclude everything else.Note that with git 2.9.x/2.10 (mid 2016?), it might be possible to re-include a file if a parent directory of that file is excluded if there is no wildcard in the path re-included.
Nguyễn Thái Ngọc Duy (
pclouds
) is trying to add this feature:However, since one of the condition to re-inclusion was:
That would not have worked here.