How to alias 'git checkout' to 'git co'

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