ignoring any 'bin' directory on a git project

前端 未结 15 1809
暖寄归人
暖寄归人 2020-11-22 16:45

I have a directory structure like this:

.git/
.gitignore
main/
  ...
tools/
  ...
...

Inside main and tools, and any other directory, at an

15条回答
  •  攒了一身酷
    2020-11-22 17:13

    The ** never properly worked before, but since git 1.8.2 (March, 8th 2013), it seems to be explicitly mentioned and supported:

    The patterns in .gitignore and .gitattributes files can have **/, as a pattern that matches 0 or more levels of subdirectory.

    E.g. "foo/**/bar" matches "bar" in "foo" itself or in a subdirectory of "foo".

    In your case, that means this line might now be supported:

    /main/**/bin/
    

提交回复
热议问题