summaryrefslogtreecommitdiff
path: root/advice.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-29 10:39:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-02 04:57:00 (GMT)
commit328c6cb853d7237098569de9f94bc3d259846a08 (patch)
tree2c60dadbceba1dca728bc74fd14100f4dc71178d /advice.c
parentae36fe694180ad2646983d43c5bf12841ac2db47 (diff)
downloadgit-328c6cb853d7237098569de9f94bc3d259846a08.zip
git-328c6cb853d7237098569de9f94bc3d259846a08.tar.gz
git-328c6cb853d7237098569de9f94bc3d259846a08.tar.bz2
doc: promote "git switch"
The new command "git switch" is added to avoid the confusion of one-command-do-all "git checkout" for new users. They are also helpful to avoid ambiguation context. For these reasons, promote it everywhere possible. This includes documentation, suggestions/advice from other commands... The "Checking out files" progress line in unpack-trees.c is also updated to "Updating files" to be neutral to both git-checkout and git-switch. 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 'advice.c')
-rw-r--r--advice.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/advice.c b/advice.c
index b224825..24a7741 100644
--- a/advice.c
+++ b/advice.c
@@ -191,20 +191,20 @@ void NORETURN die_conclude_merge(void)
void detach_advice(const char *new_name)
{
const char *fmt =
- _("Note: checking out '%s'.\n"
+ _("Note: switching to '%s'.\n"
"\n"
"You are in 'detached HEAD' state. You can look around, make experimental\n"
"changes and commit them, and you can discard any commits you make in this\n"
- "state without impacting any branches by performing another checkout.\n"
+ "state without impacting any branches by switching back to a branch.\n"
"\n"
"If you want to create a new branch to retain commits you create, you may\n"
- "do so (now or later) by using -b with the checkout command again. Example:\n"
+ "do so (now or later) by using -c with the switch command. Example:\n"
"\n"
- " git checkout -b <new-branch-name>\n"
+ " git switch -c <new-branch-name>\n"
"\n"
- "Or undo this checkout with:\n"
+ "Or undo this operation with:\n"
"\n"
- " git checkout -\n"
+ " git switch -\n"
"\n"
"Turn off this advice by setting config variable advice.detachedHead to false\n\n");