vkjjcw
Last Updated: February 25, 2016
·
233
· janosgyerik
32ef4e3e388cbadc756a008cade3ee6a

Easy way to git push the current branch

git

When working with feature branches, I tend to use long-ish branch names. Then when I push to a remote for the first time (for code review), it's a bit tedious to spell out the full name of the branch, for example:

git push -u origin cool-new-feature

An equivalent and more ergonomic way:

git push -u origin HEAD

In case insensitive systems like Windows and Mac OS X this works too and even easier:

git push -u origin head
Say Thanks
Respond
Filed Under