How to alias a command in git

Aliasing a command is very useful as it lets you shortcut a normal workflow and work more efficiently!

My favourite git upush

git upush is the equivalent of git push -u origin <current branch name> in other words the command you will use when pushing a branch which you have just created.

micro ~/.gitconfig
    upush = !git push -u origin $(git symbolic-ref --short HEAD)