Is [---] a comment in .gitconfig?

。_饼干妹妹 提交于 2019-12-03 15:20:32

问题


This question is based on this thread.

Is [---] a comment in Git such that I can use only % tool=opendiff % once in my .gitconfig?


回答1:


I think you are asking whether the square bracket syntax in .gitconfig means something significant. The answer is yes, it separates .gitconfig into sections. Each section has a name, shown between the square brackets. For example:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false

In the above example, the section name is core. If you change the word core to something else, Git won't be able to find, for example, the bare option because it needs to be inside the core section.

The git-config(1) manual page has a whole section describing the format of the configuration file.



来源:https://stackoverflow.com/questions/1081186/is-a-comment-in-gitconfig

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!