Merge branch 'yo/doc-use-more-switch-c'

Doc update.

* yo/doc-use-more-switch-c:
  doc: add "git switch -c" as another option on detached HEAD
This commit is contained in:
Junio C Hamano 2023-01-21 17:21:59 -08:00
commit b106341d57

View File

@ -477,9 +477,9 @@ before that happens. If we have not yet moved away from commit `f`,
any of these will create a reference to it: any of these will create a reference to it:
------------ ------------
$ git checkout -b foo <1> $ git checkout -b foo # or "git switch -c foo" <1>
$ git branch foo <2> $ git branch foo <2>
$ git tag foo <3> $ git tag foo <3>
------------ ------------
<1> creates a new branch `foo`, which refers to commit `f`, and then <1> creates a new branch `foo`, which refers to commit `f`, and then