Re: push.default: current vs upstream

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

 



Hi,

I only now read this thread (or most of it).

First of all, personally I never do 'git push' because I'm never sure
of what it would do, and instead of trying to figure it out, I just
specify the branches/tags I want to push.

I've seen a lot of people vote for 'upstream', and while I think
that's an improvement, I saw very good arguments against it; namely;
the fact that the configured upstream might not be the right one, and
that it would be confusing to new users. Hell, I almost never know
what is the upstream branch of the branch I am currently on, so I
think 'current' makes more sense.

However, another good argument is that switching away from matching
would break the symmetry with 'git pull', while it has been argued
they are not really symmetric anyway, it would be nice if they were.
Which brings me to how I personally use 'git pull'; I never use it in
any shape or form, and the reason is similar to why I don't do 'git
push'; I don't know what it's going to do.

I think it's important to consider what people have been suggesting
new users, and one common suggestion has been to change the
'push.default' configuration right away, so it most definitely needs
to be changed, but another common suggestion is to avoid 'git pull'
completely.

Personally I think that if 'push.default' was 'current', I might use
'git push' without arguments more often, as I would know *exactly*
what's going to happen, and it's very often what I want. But also, it
would be great if 'git pull' without arguments did something
symmetrically similar; only pull a branch with the same name. In
addition to that, a lot of people end up doing merges by mistake,
because they use 'git pull' assuming it would do the same as in other
SCMs, so it would be great if 'git pull' would do --rebase by default,
and use the remote/current branch as the base for the rebase instead.
This is more or less what I always end up doing manually anyway (git
fetch origin; git rebase -i origin/master).

While the 'git pull' changes are a separate topic, I wanted to mention
them as a rationale as to why I think 'push.default' should be
'current'.

Cheers.

-- 
Felipe Contreras
--
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]