Aliases
suggest changeThere are two ways of creating aliases in Git.
Define aliases in ~/.gitconfig
file:
[alias]
ci = commit
st = status
co = checkout
Use git config
:
git config --global alias.ci "commit"
git config --global alias.st "status"
git config --global alias.co "checkout"
After the alias is created you can use:
git ci
instead ofgit commit
,git st
instead ofgit status
,git co
instead ofgit checkout
.
As with regular git commands, aliases can be used beside arguments. For example:
git ci -m "Commit message..."
git co -b feature-42
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents