I have installed git with command:

sudo apt-get install git

I even set the username and email in git config using this:

$ git config --global user.name "John Doe"

$ git config --global user.email johndoe@example.com

But when I type the command

git config --list

It shows only these two on the list as:

user.name=John Doe

But in the main reference I saw a lot more in the list, even when configured in windows 8, I configured only this much and got complete list! Does this mean that there is something left to configure? The reference also says "If not configured, Git uses your system’s default editor". How can I figure out if everything is OK, or it still needs to be configured?


No, a default installation and only specifying user.name and user.email, you will only have those two options list. Take a look at the documentation on where these values are pulled:

If not set explicitly with --file, there are four files where git config will search for configuration options:


System-wide configuration file.


Second user-specific configuration file. If $XDG_CONFIG_HOME is not set or empty, $HOME/.config/git/config will be used. Any single-valued variable set in this file will be overwritten by whatever is in ~/.gitconfig. It is a good idea not to create this file if you sometimes use older versions of Git, as support for this file was added fairly recently.


User-specific configuration file. Also called "global" configuration file.


Repository specific configuration file.

Take a look at the options. Most have defaults or default behavior that git will take if not specified.

To answer your question, you should have a usable configuration even with those couple specified.

|improve this answer|||||
  • 1
    I saw ~/.gitconfig file and it has only those two set options. But I didn't get the /etc/gitconfig file. I think its missing! Is this a problem? – Ankur Shah Mar 28 '16 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.