Where does the .gitignore file belong?

后端 未结 8 902
我寻月下人不归
我寻月下人不归 2020-12-12 08:43

Does the .gitignore file belong in the .git folder structure somewhere or in the main source files?

相关标签:
8条回答
  • 2020-12-12 09:27

    As the other answers stated, you can place .gitignore within any directory in a Git repository. However, if you need to have a private version of .gitignore, you can add the rules to .git/info/exclude file.

    0 讨论(0)
  • 2020-12-12 09:27

    You can place .gitignore in any directory in git.

    It's commonly used as a placeholder file in folders, since folders aren't usually tracked by git.

    0 讨论(0)
提交回复
热议问题