Re: [RFC PATCH] push: start warning upcoming default change for push.default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marc Branchaud <marcnarc@xxxxxxxxxxx> wrote:

> I think that an incantation like
> 
>   git checkout -b topic origin/master
> 
> makes it pretty clear that topic is meant to be merged into origin's 
> master branch.  And so a simple "git push" as you describe I think 
> *should* update origin's master branch.

Not for us, no.  (But this is maybe a different topic.)

In our workflow (centralized repository), we never ever have a local
branch with a different name than its upstream branch. Never.

When we say

  git checkout -b topic origin/master

then it's always a mistake, and what we really meant was

  git checkout -b --no-track topic origin/master

This has bitten us a few times in the past (people accidentally pushing
their topic branches to master this way), and it's very annoying.


But coming back to the subject of push.default: in our environment,
"upstream" is the only default that is useful with the current behaviour
of git.

(I could dream of a git mode where it's not necessary to explicitly set
an upstream branch, and all git operations such as status, pull, or even
saying "@{u}" would automatically use "remotes/origin/samename" as the
upstream branch.  In that case, "current" would be a more convenient
default value for push.default; but I guess that hypothetical mode would
imply this anyway.)


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]