Last Updated: February 25, 2016
·
558
· dimitrismistriotis

Push current branch to origin

Hack, but saves some keystrokes:

git push -u origin `git branch | grep '*' | sed -e 's/* //'`

and/or to aliases file:
alias pushbranchtoorigin='git push -u origin `git branch | grep '*' | sed -e 's/* //'`'

1 Response
Add your response

I'm pretty sure if if you just do git push origin it will push the current branch.

over 1 year ago ·