aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/config.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-02 15:30:41 -0700
committerJunio C Hamano <gitster@pobox.com>2018-08-02 15:30:41 -0700
commit50858edd1aa063d3ee2ecb48672c43630cea9070 (patch)
tree16e42089e479d0776ff94fa9621daf6f815a6668 /Documentation/config.txt
parenta81575aa91a015535374bb5b1e0e6dc2a81c74ab (diff)
parent8d7b558baebe3abbbad4973ce1e1f87a7da17f47 (diff)
downloadgit-50858edd1aa063d3ee2ecb48672c43630cea9070.tar.gz
Merge branch 'ab/checkout-default-remote'
"git checkout" and "git worktree add" learned to honor checkout.defaultRemote when auto-vivifying a local branch out of a remote tracking branch in a repository with multiple remotes that have tracking branches that share the same names. * ab/checkout-default-remote: checkout & worktree: introduce checkout.defaultRemote checkout: add advice for ambiguous "checkout <branch>" builtin/checkout.c: use "ret" variable for return checkout: pass the "num_matches" up to callers checkout.c: change "unique" member to "num_matches" checkout.c: introduce an *_INIT macro checkout.h: wrap the arguments to unique_tracking_name() checkout tests: index should be clean after dwim checkout
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 3fdc6f0327..44df580a81 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -344,6 +344,16 @@ advice.*::
Advice shown when you used linkgit:git-checkout[1] to
move to the detach HEAD state, to instruct how to create
a local branch after the fact.
+ checkoutAmbiguousRemoteBranchName::
+ Advice shown when the argument to
+ linkgit:git-checkout[1] ambiguously resolves to a
+ remote tracking branch on more than one remote in
+ situations where an unambiguous argument would have
+ otherwise caused a remote-tracking branch to be
+ checked out. See the `checkout.defaultRemote`
+ configuration variable for how to set a given remote
+ to used by default in some situations where this
+ advice would be printed.
amWorkDir::
Advice that shows the location of the patch file when
linkgit:git-am[1] fails to apply it.
@@ -1104,6 +1114,22 @@ browser.<tool>.path::
browse HTML help (see `-w` option in linkgit:git-help[1]) or a
working repository in gitweb (see linkgit:git-instaweb[1]).
+checkout.defaultRemote::
+ When you run 'git checkout <something>' and only have one
+ remote, it may implicitly fall back on checking out and
+ tracking e.g. 'origin/<something>'. This stops working as soon
+ as you have more than one remote with a '<something>'
+ reference. This setting allows for setting the name of a
+ preferred remote that should always win when it comes to
+ disambiguation. The typical use-case is to set this to
+ `origin`.
++
+Currently this is used by linkgit:git-checkout[1] when 'git checkout
+<something>' will checkout the '<something>' branch on another remote,
+and by linkgit:git-worktree[1] when 'git worktree add' refers to a
+remote branch. This setting might be used for other checkout-like
+commands or functionality in the future.
+
clean.requireForce::
A boolean to make git-clean do nothing unless given -f,
-i or -n. Defaults to true.