git config --global alias.<name> "<command>"
git config --global alias.<name> "<command>"
Risk: Safe
What it does
Makes a short name for a Git command you type often.
When to use it
When you are tired of typing a long command.
Example
$ git config --global alias.st statusNow git st does the same as git status.
$ git config --global alias.lg "log --oneline --graph --all"git lg draws your whole history.
$ git config --global --get-regexp aliasList all your aliases.
Learn it in: Aliases, includeIf, line endings · Official docs