aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2020-10-07 22:48:15 -0700
committerJunio C Hamano <gitster@pobox.com>2020-10-08 09:25:29 -0700
commit64f1f58fe7c0837bd0ae56ba83add5e1b84c54d3 (patch)
tree9ec6d813813db2e42f52855b96b0fb5abbe72a40 /Documentation/git-checkout.txt
parentef09e7ddf3e77960ea24ea1580439fb725b4063a (diff)
downloadgit-64f1f58fe7c0837bd0ae56ba83add5e1b84c54d3.tar.gz
checkout: learn to respect checkout.guess
The current behavior of git checkout/switch is that --guess is currently enabled by default. However, some users may not wish for this to happen automatically. Instead of forcing users to specify --no-guess manually each time, teach these commands the checkout.guess configuration variable that gives users the option to set a default behavior. Teach the completion script to recognize the new config variable and disable DWIM logic if it is set to false. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index afa5c11fd3..1435d3de9e 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -192,7 +192,10 @@ branches from there if `<branch>` is ambiguous but exists on the
'origin' remote. See also `checkout.defaultRemote` in
linkgit:git-config[1].
+
-Use `--no-guess` to disable this.
+`--guess` is the default behavior. Use `--no-guess` to disable it.
++
+The default behavior can be set via the `checkout.guess` configuration
+variable.
-l::
Create the new branch's reflog; see linkgit:git-branch[1] for