Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Arne Gangstad <finnag@pvv.org>2009-03-16 18:42:51 +0300
committerJunio C Hamano <gitster@pobox.com>2009-03-18 00:50:21 +0300
commit521537476fe99b97bfcdf1b8f0c579061af5fd3e (patch)
tree54e9b9349d7ba1197de646dfaf7154968ee2470b /Documentation/config.txt
parent52e7787609d18af76a8c1befb0a06123fb7ce89e (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>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt18
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