Re: git push

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

 



2009/2/25 Junio C Hamano <gitster@xxxxxxxxx>:
> John Tapsell <johnflux@xxxxxxxxx> writes:
>
>>   Following the idea of 'least damage', what do people think of making
>> "git push" only push the branch you are currently on?
>
> Having an easy way to ask to push only one branch (typically the currently
> checked-out one) is a good thing.  You can obviously say "git push origin
> master" (or whatever branch you are on).  We also added "git push origin
> HEAD".  I thought we even added "git push HEAD" or "git push --current",
> but I may be mistaken.
>
> But if you are talking about changing the default when "git push" is run
> without any parameter, I have to say it is a terrible idea, for two
> reasons, and one is too obvious to state so I wouldn't repeat it and talk
> only about the other one.

Presumably the obvious is that it might be confusing to existing
users?  Perhaps, but it doesn't cause any damage.  It's moving to a
'safer' default.

> I've noticed that people who ask for such a default tend to push too often
> and worse they tend to push before they have their act together.  Surely
> their other branches may not be ready, but it is likely their current
> branch isn't either ;-)

You're against making push affect only the current branch in order to
punish people who push too often?  Okaaay..

> If you shoot for the least damage for such people, the sanest default for
> "git push" would be to do nothing.  You *always* say what to push where,
> then there is no risk of pushing something you did not intend to.  Perhaps
> "push.default = never" configuration may not be such a bad idea?

That wouldn't be a terrible idea, although perhaps a bit strange.

John
--
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]

  Powered by Linux