Engineering Full Stack Apps with Java and JavaScript
git config --system
Stored in etc/gitconfig in Mac / Linux. Similar structure in Windows, usually within usually within Program Files.
git config --global
Stored in ~/.gitconfig in Mac / Linux. Similar structure in Windows, within user home folder.
git config
Stored in .git/config in each repo.
Note: More common to modify global or repository level configuration, than system level.
git config --global user.name "<Name>"
git config --global user.email "<email>"
git config --global --list
Or:
git config --global user.name
Displays configured username.
git config --global user.email
Displays configured email.
Or:
cat ~/.gitconfig
To see contents of config file.
git config --global help.autocorrect 1
Example:
First try:
git statsu
git: 'statsu' is not a git command. See 'git --help'.
Then try:
git config --global help.autocorrect 1
gitstatsu
WARNING: You called a Git command named 'statsu', which does not exist.
Continuing in 0.1 seconds, assuming that you meant 'status'.
git config --global color.ui auto