When I want to push changes on a branch that already has upstream branch, git push
is all I need. But when there's no current upstream branch, I have to type out git push -u $BRANCH_NAME
.
I create new branches all the time (for every feature that I work on, so it's about one every two hours or so). I also make typos sometimes. It gets irritating. How can I create an alias that would automatically resolve to git push
or git push -u $BRANCH_NAME
and wouldn't require me to type out branch name?