Re: push.default: current vs upstream

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

 



On Sat, Mar 31, 2012 at 4:48 PM, Seth Robertson <in-gitvger@xxxxxxxx> wrote:
>
> In message <CA+7g9JxK5DHj3vbdGgF2dEJxvn=_ZfjAv7Y+AL_P-aO1FVB6-w@xxxxxxxxxxxxxx>, Nathan Gray writes:
>
>    If a user does some work on his new "features/frobnitz" branch and
>    does a "git push" only to find that his work has been committed to the
>    company's master branch he will be confused, frustrated, and publicly
>    embarrassed.  He then has to apologize and figure out how to revert
>    the changes.  I really don't see any scenario where that user ends up
>    saying "oh yeah, I guess git was right and I was wrong."
>
> When working with a single remote, I tend to agree with you (though
> since I also think receive.denyDeletes should be on by default for
> shared repos the public humiliation of creating a branch when you did
> not mean to might still exist but of course it will be less damaging
> to others) .  However, tracking really comes into its own when working
> with multiple remotes.  Is creating a stumbling block between naïve
> use and more sophisticated use really necessary?

Where's the stumbling block?  Nobody's talking about taking away the
upstream option, so sophisticated users who prefer upstream behavior
can configure their repos to get it.  The default should be tailored
for naïve users, not power users.

> However, the current message for this use case could seem to be
> tweaked to take care of this:
>
> $ git branch BB origin/B
> Branch BB set up to track remote branch B from origin.
>
> Add "If you push your changes will go there."
> And "See git branch --upstream to modify both settings"
>
> This provides the power of tracking with smaller possibility of
> the type of embarrassment you envision.

I like the idea of telling users where their pushes will go, but I
don't think this will work as well as you might expect.  You're
relying on a new user to read every part of the message, understand
the terminology, and internalize the meaning well enough to remember
it in the distant future when he's ready to push.  Considering the
onslaught of new concepts to absorb when a user switches from
centralized to distributed SCM that's a pretty tall order.

I think it's backwards to put a heavier cognitive load on newbies for
the sake of saving power users from running git config.  After all,
power users *love* running git config.  ;^)

Cheers,
-Nathan

-- 
http://n8gray.org
--
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]