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.
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.
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
Also, can edit this into your git config:
[alias]
co = checkout
simply to add some comments, the bash alias is for setting alias for a command, and the co or checkout is the parameter or flag to the command git, so it won't work.
© 2022 - 2024 — McMap. All rights reserved.