Are multiple `.gitignore`s frowned on?

后端 未结 5 1710
遥遥无期
遥遥无期 2020-12-04 06:48

Unless a repo consisted of several independent projects, it seems it would be simplest to just have one .gitignore file at the root of the repo than various one

5条回答
  •  情书的邮戳
    2020-12-04 07:20

    As a tangential note, one case where the ability to have multiple .gitignore files is very useful is if you want an extra directory in your working copy that you never intend to commit. Just put a 1-byte .gitignore (containing just a single asterisk) in that directory and it will never show up in git status etc.

提交回复
热议问题