Commands we will use
git config —list
= list your git configuration
git config —system
= git configuration for the machine in general
git config —global
= user configuration for any project
The first thing you should do when installing Git is to configure your username and email address. This is important because each commit uses this information, and it is immutably stamped on the commits you start creating:
$ git config --global user.name ramirezmz
$ git config --global user.email ramirezmz@exemplo.br
Other configs that help in everyday life
Your favorite editor
When there is a need to edit messages and/or other things that need text editing, git will use some editor by default, but you can already tell git which one to use, in my case, I prefer to use neovim.
git config --global core.editor nvim
Autocomplete git
Let's say you mistyped or forgot the command to add items, git will recommend commands similar to what you tried to type. Also, the correct command will be executed after the x seconds you put
git config --global help.autocorrect 20
Default branch
git config --global init.defaultbranch=master
Top comments (0)