Glam Prestige Journal

Bright entertainment trends with youth appeal.

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 

But when I type the command

git config --list

It shows only these two on the list as:

user.name=John Doe
user.email=

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?

1 Answer

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.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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