diff options
author | Finn Arne Gangstad <finnag@pvv.org> | 2009-03-16 16:42:51 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-17 14:50:21 -0700 |
commit | 521537476fe99b97bfcdf1b8f0c579061af5fd3e (patch) | |
tree | 54e9b9349d7ba1197de646dfaf7154968ee2470b /Documentation | |
parent | archive: use parseopt for local-only options (diff) | |
download | tgif-521537476fe99b97bfcdf1b8f0c579061af5fd3e.tar.xz |
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index f5152c5038..7b2b3f44aa 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1160,6 +1160,24 @@ pull.octopus:: pull.twohead:: The default merge strategy to use when pulling a single branch. +push.default:: + Defines the action git push should take if no refspec is given + on the command line, no refspec is configured in the remote, and + no refspec is implied by any of the options given on the command + line. ++ +The term `current remote` means the remote configured for the current +branch, or `origin` if no remote is configured. `origin` is also used +if you are not on any branch. Possible values are: ++ +* `nothing` do not push anything. +* `matching` push all matching branches to the current remote. + All branches having the same name in both ends are considered to be + matching. This is the current default value. +* `tracking` push the current branch to the branch it is tracking. +* `current` push the current branch to a branch of the same name on the + current remote. + receive.fsckObjects:: If it is set to true, git-receive-pack will check all received objects. It will abort in the case of a malformed object or a |