This question is based on this thread.
Is [---] a comment in Git such that I can use only % tool=opendiff % once in my .gitconfig?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you are asking whether the square bracket syntax in
.gitconfigmeans something significant. The answer is yes, it separates.gitconfiginto sections. Each section has a name, shown between the square brackets. For example:In the above example, the section name is
core. If you change the wordcoreto something else, Git won’t be able to find, for example, thebareoption because it needs to be inside thecoresection.The git-config(1) manual page has a whole section describing the format of the configuration file.