I'd rather suggest disabling git push without any options. It is uncontrollable to just type "git push" and hoping git to do all the magic for you.
As an alternative, I always use "git push [local]:<remote>". Forcing the syntax is making more sense than changing the default behavior from time to time.
Posted Mar 20, 2012 13:32 UTC (Tue) by ekj (guest, #1524)
[Link]
Yes. What git needs is commands that take a bunch of arguments where you specify everything for everyday routine commands. Because the learning-curve isn't nearly steep enough as it is.
Git project seeks discussion on "push" change
Posted Mar 20, 2012 18:54 UTC (Tue) by fragmede (subscriber, #50925)
[Link]
+1 to making pain "git push" a nop.
A question I'm often asked is how the local branch name can different from the remote branch name, which is what this syntax is for. It also makes it easier to remember that "git push :<remote>" deletes the remote branch, and ":" isn't some randomly chosen character to delete remote things.
It's just a shame that the git push local:remote syntax is so high up on the learning cliff that many git users don't know about it.
Git project seeks discussion on "push" change
Posted Mar 21, 2012 6:01 UTC (Wed) by cpeterso (guest, #305)
[Link]
This option forces you to always enter the name of the remote branch you wish to push to, rather than using a default value. This is good practice as it ensures you push to the correct remote branch and avoid accidentally pushing all local branches to the remote.