Where does the .gitignore file belong?

后端 未结 8 910
我寻月下人不归
我寻月下人不归 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:26

    In the simple case, a repository might have a single .gitignore file in its root directory, which applies recursively to the entire repository. However, it is also possible to have additional .gitignore files in subdirectories. The rules in these nested .gitignore files apply only to the files under the directory where they are located. The Linux kernel source repository has 206 .gitignore files.

    -- this is what i read from progit.pdf(version 2), P32

提交回复
热议问题