From 6b37dff17f176d7e87efa93b4cf521dd725de247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 6 Nov 2011 10:50:10 +0100 Subject: pull: introduce a pull.rebase option to enable --rebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we either need to set branch..rebase for existing branches if we'd like "git pull" to mean "git pull --rebase", or have the forethought of setting "branch.autosetuprebase" before we create the branch. Introduce a "pull.rebase" option to globally configure "git pull" to mean "git pull --rebase" for any branch. This option will be considered at a lower priority than branch..rebase, i.e. we could set pull.rebase=true and branch..rebase=false and the latter configuration option would win. Reviewed-by: Sverre Rabbelier Reviewed-by: Fernando Vezzosi Reviewed-by: Eric Herman Signed-off-by: Ævar Arnfjörð Bjarmason Liked-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/config.txt | 20 ++++++++++++++++---- Documentation/git-pull.txt | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 6b93777199..256d27c3b5 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -668,10 +668,12 @@ branch..mergeoptions:: branch..rebase:: When true, rebase the branch on top of the fetched branch, instead of merging the default branch from the default remote when - "git pull" is run. - *NOTE*: this is a possibly dangerous operation; do *not* use - it unless you understand the implications (see linkgit:git-rebase[1] - for details). + "git pull" is run. See "pull.rebase" for doing this in a non + branch-specific manner. ++ +*NOTE*: this is a possibly dangerous operation; do *not* use +it unless you understand the implications (see linkgit:git-rebase[1] +for details). browser..cmd:: Specify the command to invoke the specified browser. The @@ -1548,6 +1550,16 @@ pretty.:: Note that an alias with the same name as a built-in format will be silently ignored. +pull.rebase:: + When true, rebase branches on top of the fetched branch, instead + of merging the default branch from the default remote when "git + pull" is run. See "branch..rebase" for setting this on a + per-branch basis. ++ +*NOTE*: this is a possibly dangerous operation; do *not* use +it unless you understand the implications (see linkgit:git-rebase[1] +for details). + pull.octopus:: The default merge strategy to use when pulling multiple branches at once. diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 14609cbd4d..756909cb10 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -107,7 +107,7 @@ include::merge-options.txt[] fetched, the rebase uses that information to avoid rebasing non-local changes. + -See `branch..rebase` and `branch.autosetuprebase` in +See `pull.rebase`, `branch..rebase` and `branch.autosetuprebase` in linkgit:git-config[1] if you want to make `git pull` always use `{litdd}rebase` instead of merging. + -- cgit v1.2.3