diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2022-02-26 06:12:13 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-26 06:21:48 (GMT) |
commit | 808213ba36ea72408cc45117a825ad9a714535ba (patch) | |
tree | 46ce0e0ac916122d22dfe7ddd552c36beff5714d /Documentation/config/advice.txt | |
parent | dab1b7905d0b295f1acef9785bb2b9cbb0fdec84 (diff) | |
download | git-808213ba36ea72408cc45117a825ad9a714535ba.zip git-808213ba36ea72408cc45117a825ad9a714535ba.tar.gz git-808213ba36ea72408cc45117a825ad9a714535ba.tar.bz2 |
switch: mention the --detach option when dying due to lack of a branch
Users who are accustomed to doing `git checkout <tag>` assume that
`git switch <tag>` will do the same thing. Inform them of the --detach
option so they aren't left wondering why `git switch` doesn't work but
`git checkout` does.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config/advice.txt')
-rw-r--r-- | Documentation/config/advice.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt index adee26f..c40eb09 100644 --- a/Documentation/config/advice.txt +++ b/Documentation/config/advice.txt @@ -85,6 +85,9 @@ advice.*:: linkgit:git-switch[1] or linkgit:git-checkout[1] to move to the detach HEAD state, to instruct how to create a local branch after the fact. + suggestDetachingHead:: + Advice shown when linkgit:git-switch[1] refuses to detach HEAD + without the explicit `--detach` option. checkoutAmbiguousRemoteBranchName:: Advice shown when the argument to linkgit:git-checkout[1] and linkgit:git-switch[1] |