What is the right syntax of .gitignore to exclude all the *.cache
files in all subdirectories of /StringsEditor
directory?
I tried both /StringsEditor/*.cache
and /StringsEditor/*/*.cache
but none of them works.
What is the right syntax of .gitignore to exclude all the *.cache
files in all subdirectories of /StringsEditor
directory?
I tried both /StringsEditor/*.cache
and /StringsEditor/*/*.cache
but none of them works.
This is probably the result of a misunderstanding. Paths in .gitignore do not need to be relative to the root of the repository. I.e. you could ignore just *.cache
. If you actually do only want this to occur for StringsEditor subdirectories, then you can use StringsEditor/**/*.cache
.
More information here.
Just put *.cache
in StringsEditor/.gitignore
.