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]

 



This is my 2 cents from helping out on #git. I don't consider workflows at all, only how to minimise confusion for new users when they're trying to understand how git works.

We occasionally get users who are having trouble understanding why the argument-less form of 'git pull' is failing, due to lack of tracking configuration. We explain that the tracking config is git's way of "connecting" local and remote branches, and how to use 'git push -u' and 'git branch --set-upstream' appropriately.

This is all well and good -- they've discovered that local and remote branches are separate, that they aren't "magically" joined, that there's a bit of configuration data which "connects" the two, and how to manipulate it.

Users then assume that argument-less form of 'git push' uses the same mechanism. To then discover that it (by default) uses a different way of "connecting" local and remote branches is often confusing [1]. In addition, it can't be manipulated in the same way as the tracking config they learnt about before.

For this reason, I am in favour of push.default = upstream. Although it requires knowledge about setting up tracking config (in the cases where tracking config isn't set automatically), this knowledge has to be gained anyway for the argument-less form of 'git pull' to work.


[1]: Indeed, a lot of users only find out about this difference when it has bitten them in some way.

Thanks,
Antony
--
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]