Re: Please discuss: what "git push" should do when you do not say what to push?

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

 



demerphq <demerphq@xxxxxxxxx> writes:

> ... I thought the worse case here is
> minor inconvenience, not data loss or anything else that is obviously
> harmful.

If your definition of harm is limited to data loss then we wouldn't be
talking about updating the default from matching to current or upstream.
"If your push failed, pushed what you did not mean to, or did not push
what you meant to, you would correct the mistake" applies equally to a new
person who expected "current" (or "upstream") and got "matching", or an old
person who expected "matching" and got "current".

The purpose of the default change is to reduce surprises to people who
haven't yet learned Git too well.  And for them,

    I was on master, I said 'git push' without saying what to push to
    where, and it resulted in master updated at the central repository.

is the least surprising outcome.  Note that a learnt Git user would not
express what he did this way; he will say 'I was on *my* master' and
'the master at the central repository was updated with *my* master', but
the change of the default is to help those who haven't even learned that
your branches and branches at the central server are not always connected.

Choice of "upstream" is more convenient for users who learned Git a bit
more and knows the distinction between branches you have and branches the
central server has.  For them, "I was on my 'topic' branch, that was
forked from the 'master' branch at the central repository. I said 'git
push', and I updated the 'master' over there with my 'topic'", is also not
surprising, but it is more advanced audience than those helped by the
default setting to push 'current'.

In either way, once people learn sufficiently to the point that they can
choose their own default that suit them, there is no need for handholding.
They won't be surprised.

But except for one case you should *not* forget about.

The ones who get pulled the old default under their feet while not paying
too much attention to this discussion. The change will hit them with a
surprise, and that is what I am trying to avoid here.
--
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]