diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-03-29 13:39:05 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-02 07:56:59 +0300 |
commit | d787d311dbd7a4104a9dde23b90ae24528a15cf9 (patch) | |
tree | 230257b33d63907678d78b903ac8d75585dd7cc9 /Documentation/config/checkout.txt | |
parent | 208718227207480b0f58e35e045e36ed36a59205 (diff) |
checkout: split part of it to new command 'switch'
"git checkout" doing too many things is a source of confusion for many
users (and it even bites old timers sometimes). To remedy that, the
command will be split into two new ones: switch and restore. The good
old "git checkout" command is still here and will be until all (or most
of users) are sick of it.
See the new man page for the final design of switch. The actual
implementation though is still pretty much the same as "git checkout"
and not completely aligned with the man page. Following patches will
adjust their behavior to match the man page.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config/checkout.txt')
-rw-r--r-- | Documentation/config/checkout.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/config/checkout.txt b/Documentation/config/checkout.txt index c4118fa196..d6872ffa83 100644 --- a/Documentation/config/checkout.txt +++ b/Documentation/config/checkout.txt @@ -1,5 +1,6 @@ checkout.defaultRemote:: - When you run 'git checkout <something>' and only have one + When you run 'git checkout <something>' + or 'git switch <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>' @@ -8,8 +9,10 @@ checkout.defaultRemote:: 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, +Currently this is used by linkgit:git-switch[1] and +linkgit:git-checkout[1] when 'git checkout <something>' +or 'git switch <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. |