c4118fa1968711c9f5e6c491913a63c86d5ea20c
[platform/upstream/git.git] / Documentation / config / checkout.txt
1 checkout.defaultRemote::
2         When you run 'git checkout <something>' and only have one
3         remote, it may implicitly fall back on checking out and
4         tracking e.g. 'origin/<something>'. This stops working as soon
5         as you have more than one remote with a '<something>'
6         reference. This setting allows for setting the name of a
7         preferred remote that should always win when it comes to
8         disambiguation. The typical use-case is to set this to
9         `origin`.
10 +
11 Currently this is used by linkgit:git-checkout[1] when 'git checkout
12 <something>' will checkout the '<something>' branch on another remote,
13 and by linkgit:git-worktree[1] when 'git worktree add' refers to a
14 remote branch. This setting might be used for other checkout-like
15 commands or functionality in the future.
16
17 checkout.optimizeNewBranch::
18         Optimizes the performance of "git checkout -b <new_branch>" when
19         using sparse-checkout.  When set to true, git will not update the
20         repo based on the current sparse-checkout settings.  This means it
21         will not update the skip-worktree bit in the index nor add/remove
22         files in the working directory to reflect the current sparse checkout
23         settings nor will it show the local changes.