问题
I'd like the command git co
to be the same as typing git checkout
.
A normal Bash alias (alias co='checkout'
) doesn't work.
回答1:
The command:
git config --global alias.co checkout
will create a git alias to do that. It will add the following entry into your global ~/.gitconfig
file:
[alias]
co = checkout
回答2:
Also, can edit this into your git config:
[alias]
co = checkout
来源:https://stackoverflow.com/questions/14489109/how-to-alias-git-checkout-to-git-co