Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for June 20, 2013
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
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.
Git project seeks discussion on "push" change
Posted Mar 20, 2012 13:32 UTC (Tue) by ekj (guest, #1524)
Posted Mar 20, 2012 18:54 UTC (Tue) by fragmede (subscriber, #50925)
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.
Posted Mar 21, 2012 6:01 UTC (Wed) by cpeterso (guest, #305)
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.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds