Basic instructions
user settings:
$ git config --global user.name "XXXXXX"
$ git config --global user.email "[email protected]"
Check the current settings:
$ git config --list
Save location of the settings file: Git-related settings are saved in the .gitconfig file under your account by default
Set different authors for each project
$ git config --loca user.name xxxxx
$ git config --local user.email [email protected]
other settings
Change editor
Vim is the default editor of Git, you can execute the following command in the terminal to change the editor: Change
git config --global core.editor emacs
the Vim editor to Emacs
Set abbreviations
$ git config --global alias.co checkout
$ git config --global alias.br branch
After the setting is complete, enter git co to achieve the same effect as entering the git checkout command