Re: git push default behaviour?
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:53:15
Jeremy Morton [off-list ref] writes:
On Thu, Mar 8, 2012 at 10:28 AM, Carlos Martín Nieto [off-list ref] wrote:quoted
On Thu, 2012-03-08 at 10:13 +0000, Jeremy Morton wrote:
quoted
quoted
Right, so I guess I'm saying that the default value for push.default should be upstream instead of matching...Any default is going to leave some people unhappy. If upstream is the right thing for you, then that's what you should use. Most questions I see about push not doing what the users expect would actually benefit from 'current'. 'matching' is a fairly safe default, as it won't try to push private branches or changes in private branches that track something upstream.But 'push --force' WILL try to push your (probably outdated) master upstream, killing any changes there made since you last updated. That alone is so dangerous it seems like reason enough to avoid it by default.
You can always configure server to refuse forced pushes. -- Jakub Narebski