Matthieu Moy [off-list ref] writes:
I don't know what can be done to improve the case of detached HEAD with
push.default=matching. Perhaps Git should warn when HEAD is not pushed
(detached HEAD, or HEAD points to a branch that doesn't exist remotely)?
Please don't. For those whose workflow clearly separates local
history building (checking different branches, making commits, etc.)
and publishing the result (git push), "git push" is *not* a way to
say "I am done with the work I have been doing on *this* branch",
but is a way to say "I am done for the day, and all the branches I
push out are in good order". It does not matter what branch the user
happens to be on when "git push" is run for them (including me).