$ git config user.name [name]
- define the author [name] to be used for all commits in the current repository
$ git config --global user.name [name]
- write to global ~/.gitconfig file rather than the repository .git/config
$ git config --global user.email [email]
- define the author email to be used for all commits by the current user
$ git config --global alias.[alias-name]
- create a shortcut for a Git command
$ git config -system core.editor [editor]
- define the text editor used by commands like
git commit
$ git config --global --edit
- open the global configuration file in a text editor for manual editing
===========================
Git stores configuration options in three separate files, which lets you scope options to individual repositories, users, or the entire system:
* [repo]/.git/config – repository-specific settings
* ~/.gitconfig – user-specific settings. This is where options set with the --global flag are stored
* $(prefix)/etc/gitconfig – system-wide settings