mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
dab1b7905d
commit
808213ba36
1
advice.c
1
advice.c
@@ -42,6 +42,7 @@ static struct {
|
||||
[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] = { "checkoutAmbiguousRemoteBranchName", 1 },
|
||||
[ADVICE_COMMIT_BEFORE_MERGE] = { "commitBeforeMerge", 1 },
|
||||
[ADVICE_DETACHED_HEAD] = { "detachedHead", 1 },
|
||||
[ADVICE_SUGGEST_DETACHING_HEAD] = { "suggestDetachingHead", 1 },
|
||||
[ADVICE_FETCH_SHOW_FORCED_UPDATES] = { "fetchShowForcedUpdates", 1 },
|
||||
[ADVICE_GRAFT_FILE_DEPRECATED] = { "graftFileDeprecated", 1 },
|
||||
[ADVICE_IGNORED_HOOK] = { "ignoredHook", 1 },
|
||||
|
||||
Reference in New Issue
Block a user