"Junio C Hamano" <gits...@pobox.com> wrote:

> > Where 'topic' is a tracking branch of 'origin/master' (I use
> > push.default=upstream). I only recently discovered that I could push to
> > 'HEAD" to do the same thing. So one ulterior motive is to make that more
> > prominent.
[...]
> Do we consider the current behaviour useful? Is it documented

Yes, since 1750783 (Documentation: more git push examples, 2009-01-26).

It may be an accident that the doc says "to the same name on the
remote." since it predates the introduction of push.default, but it
does say so and it's the actual behavior.

> already and widely known?

https://stackoverflow.com/questions/14031970/git-push-current-branch-shortcut

458 votes for the answer suggesting it.

-- 
Matthieu Moy
https://matthieu-moy.fr/

Reply via email to