how is this different from:
git push -u origin head
?
Re:Git 2.19.0 released
by saidajigumi on Wednesday September 12, 2018 @01:51PM
(#17971214)
Good point; I'd missed that someone taught git a smarter "spelling" for this task. IIRC, `git push -u origin HEAD` didn't used to automatically create a branch of the same name on that remote -- the explicit colon notion was required. I've had this little script around for a long time...
EDIT: I've forgotten offhand whether there are actual zsh-isms here. It's probably bash compatible, but I always have zsh installed by the time this script lands on a system.