How to set aliases in git

Aliases are lovely since you don’t have to write so many characters :) It’s easy to set up your own. Just go to your home catalog and edit your .gitconfig file

nano ~/.gitconfig

Here’s mine:

        co = checkout
        lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an$
        cp = cherry-pick
        c = commit -am
        dc = diff --cached
        last = log -1 --stat