Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Git: push new local branch to remote
git push -u origin newLocalBranch
Copy link

grav commented Apr 30, 2018

Get local branch name:

git push -u origin `git rev-parse --abbrev-ref HEAD`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment