How To Override Git Configurations in Windows?

The task to override git configurations is simple. All you need to be aware of is what configurations you would like to do. But before that you need to setup git in your machine.

Read here how to setup git configurations in windows

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.

Below are default values of my configuration file:

         symlinks = false
         autocrlf = true
         fscache = true
         diff = auto
         status = auto
         branch = auto
         interactive = true
         packSizeLimit = 2g
         format = html
         sslCAInfo = C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt
[diff "astextplain"]
         textconv = astextplain
         autosquash = true

To see the status of git configuration file execute below command:

$ git config – -list

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 Windows git 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.

Git Configurations Oerride Format

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.

                name = Frodo Baggins
                email =
                editor = H:/Notepad++/npp.6.9.bin/notepad++.exe
                format = txt

You can directly edit this file and override or modify the git configuration keys.

How to know git configuration key’s value

In order to check the value of a particular key. you need to execute below command :

$ git config {key name}

If I execute command “git config help.format” value “txt” is output. See below image:

Git Configurations Key Value

Hope you like the article. We highly appreciates comments and feedback.

You can also Subscribe here to stay updated on latest posts of


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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.