git config

Set up git: the author name and email, the editor and other settings

What it does

git config reads and changes git settings. The first thing to set after installing is your name and email: they go into every commit and show who did what.

With --global a setting is saved for all your repositories, in ~/.gitconfig. Without it the setting applies to the current repository only and wins over the global one: that is how you use your work email in a work project. git config --list shows every setting in effect.

Syntax

git config --global <key> <value>
git config <key> <value>
git config --list

Examples

Related commands

Practise · All commands