On 10/01/2010 01:23 PM, Andres Freund wrote:
>
> If you want that as a default behaviour:
> "For example, to default to pushing only the current branch to origin use git
> config remote.origin.push HEAD. Any valid<refspec> (like the ones in the
> examples below) can be configured as the default for git push origin."
It's just occurred to me that this might be a slightly dangerous
setting. If HEAD happens to be your private topic branch because you
forgot to switch back to the main branch, it will cheerfully push your
no longer private branch. If you have separate git dirs for each live
branch, it might be better to set the default push refspec to that
branch explicitly. Of course, if you're using the multiple workdir
pattern, that won't work because then they all share a common .git/config.
But maybe I'm just being a bit paranoid.
cheers
andrew