Ignore all files with the same name in git

From git docs

A leading "**" followed by a slash means match in all directories. For
example, "**/foo" matches file or directory "foo" anywhere, the same
as pattern "foo". "**/foo/bar" matches file or directory "bar"
anywhere that is directly under directory "foo".

For your case:

**/[Tt]est*

it also matches both upper and lower case.


Update .gitignore with test*

Also, read this for more information.


Try adding the pattern to .gitignore of test.*

Add it and do a git status with some files like you mentioned above.

If it works you're good.