author | Finn Arne Gangstad <finnag@pvv.org> | |
Mon, 16 Mar 2009 15:42:51 +0000 (16:42 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Mar 2009 21:50:21 +0000 (14:50 -0700) | ||
commit | 521537476fe99b97bfcdf1b8f0c579061af5fd3e | |
tree | 54e9b9349d7ba1197de646dfaf7154968ee2470b | tree | snapshot |
parent | 52e7787609d18af76a8c1befb0a06123fb7ce89e | commit | diff |
New config push.default to decide default behavior for push
When "git push" is not told what refspecs to push, it pushes all matching
branches to the current remote. For some workflows this default is not
useful, and surprises new users. Some have even found that this default
behaviour is too easy to trigger by accident with unwanted consequences.
Introduce a new configuration variable "push.default" that decides what
action git push should take if no refspecs are given or implied by the
command line arguments or the current remote configuration.
Possible values are:
'nothing' : Push nothing;
'matching' : Current default behaviour, push all branches that already
exist in the current remote;
'tracking' : Push the current branch to whatever it is tracking;
'current' : Push the current branch to a branch of the same name,
i.e. HEAD.
Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When "git push" is not told what refspecs to push, it pushes all matching
branches to the current remote. For some workflows this default is not
useful, and surprises new users. Some have even found that this default
behaviour is too easy to trigger by accident with unwanted consequences.
Introduce a new configuration variable "push.default" that decides what
action git push should take if no refspecs are given or implied by the
command line arguments or the current remote configuration.
Possible values are:
'nothing' : Push nothing;
'matching' : Current default behaviour, push all branches that already
exist in the current remote;
'tracking' : Push the current branch to whatever it is tracking;
'current' : Push the current branch to a branch of the same name,
i.e. HEAD.
Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | diff | blob | history | |
builtin-push.c | diff | blob | history | |
cache.h | diff | blob | history | |
config.c | diff | blob | history | |
environment.c | diff | blob | history |