"git config --list" command not showing complete list, is the configuration incomplete?

32,522

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:

$(prefix)/etc/gitconfig

System-wide configuration file.

$XDG_CONFIG_HOME/git/config

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.

~/.gitconfig

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

$GIT_DIR/config

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.

Share:
32,522

Related videos on Youtube

Ankur Shah
Author by

Ankur Shah

I am a Web Developer.

Updated on September 18, 2022

Comments

  • Ankur Shah
    Ankur Shah over 1 year

    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 [email protected]
    

    But when I type the command

    git config --list
    

    It shows only these two on the list as:

    user.name=John Doe
    [email protected]
    

    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?