summaryrefslogtreecommitdiff
path: root/Documentation/git-stash.txt
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 /Documentation/git-stash.txt
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 'Documentation/git-stash.txt')
-rw-r--r--Documentation/git-stash.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 7ef8c47..ebb6282 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -235,12 +235,12 @@ return to your original branch to make the emergency fix, like this:
+
----------------------------------------------------------------
# ... hack hack hack ...
-$ git checkout -b my_wip
+$ git switch -c my_wip
$ git commit -a -m "WIP"
-$ git checkout master
+$ git switch master
$ edit emergency fix
$ git commit -a -m "Fix in a hurry"
-$ git checkout my_wip
+$ git switch my_wip
$ git reset --soft HEAD^
# ... continue hacking ...
----------------------------------------------------------------
@@ -293,7 +293,8 @@ SEE ALSO
linkgit:git-checkout[1],
linkgit:git-commit[1],
linkgit:git-reflog[1],
-linkgit:git-reset[1]
+linkgit:git-reset[1],
+linkgit:git-switch[1]
GIT
---