gitignore any file called .KEYFILE directly inside a directory foo, which itself is anywhere
gitignore any file called .KEYFILE directly inside a directory foo, which itself is anywhere
To ignore any file named `.KEYFILE` located directly inside a `foo` directory (which can be anywhere in your repository), add this line to your `.gitignore`:
1 | **/foo/.KEYFILE |
1 2 | project/foo/.KEYFILE some/deep/path/foo/.KEYFILE |
1 2 3 | foo/bar/.KEYFILE (not directly in foo) other/.KEYFILE (not in a foo directory) foo/.KEYFILE.txt (different filename) |
Testing if the previous output contains the string **/foo/.KEYFILE
: True