Location of default git configuration file

During first time Windows installation configuration parameters are set by default. Usual path of config file is at C:\ProgramData\Git\config. Unhide ProgramData folder. It does not have any extension.

Config parameters stores different values. Any change in git file will be reflected after execution of git command as shown below:

Override git configuration parameters

In the config file let us override parameter help.format=html.

Find below the syntax to get help for any command:

$ git help {command name}

The HTML help for init will be opened in browser by this command.

As discussed in previous article How to install and setup git in Windowsgit config –global command is used to set user name and user email. I will use the same command to override help.format key.

$ git config – -global help.format txt

As you can see in below image the help.format key is overridden.

Location of Overriding git configuration file

We executed the command “git config – -global help.format txt” and overridden the key of “help.format“. The file which has overridden git configurations parameters is “C:\Users\Ankit\.gitconfig” file. Below are contents of my “.gitconfig” file.

Ankit Shah is an Expert Java Consultant worked for internationally renowned companies such as Expedia and American Airlines. Ankit is also proficient in billing, banking, and e-commerce domain. He is a table tennis enthusiast, traveler, hobbyist photographer and a good swimmer.