Skip to content

Commit 2ee8bf3

Browse files
committed
mention git switch alongside git checkout for moving HEAD
where that makes more sense than a replacement
1 parent 6ffd157 commit 2ee8bf3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎book/10-git-internals/sections/refs.asc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $ cat .git/HEAD
8484
ref: refs/heads/master
8585
----
8686

87-
If you run `git checkout test`, Git updates the file to look like this:
87+
If you run `git switch test` or `git checkout test`, Git updates the file to look like this:
8888

8989
[source,console]
9090
----
@@ -205,5 +205,5 @@ ca82a6dff817ec66f44342007202690a93763949
205205
----
206206

207207
Remote references differ from branches (`refs/heads` references) mainly in that they're considered read-only.
208-
You can `git checkout` to one, but Git won't symbolically reference HEAD to one, so you'll never update it with a `commit` command.
208+
You can `git checkout` (or `git switch --detach`) to one, but Git won't symbolically reference HEAD to one, so you'll never update it with a `commit` command.
209209
Git manages them as bookmarks to the last known state of where those branches were on those servers.

0 commit comments

Comments
 (0)