Git は、1.8.4 から .gitignore に /**/ のようなパターンを書けるようになっています (正式にサポートされたようです)。 Uses of the platform fnmatch(3) function (many places in the code, matching pathspec, .gitignore and .gitattributes to name a few) have been replaced with wildmatch, allowing "foo/**/bar" that would match foo/bar, foo/a/bar, foo/a/b/bar, etc. https://github.com/git/git/blob/maint/Documentation/RelNotes/1.8.4.txt foo/**/bar は、