Git command aliases

Git command aliases can create shortcuts for common Git commands. For example, to create an alias git st for git status:

git config --global alias.st status

Other alias examples:

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.last 'log -1 HEAD'
git config --global alias.unstage 'reset HEAD --'
git config --global alias.visual '!gitk'

This can be used to create compact commands for frequently used Git operations. These aliases reduce typing (and typos) for frequent operations. It can also be used in some cases for older versions of Git to use newer-style syntax (at least for the compatible parts of the command).

To list the Git command aliases:

git config get --all --show-names --regexp ^alias\.