Thread (1 message) 1 message, 1 author, 2025-08-26

Re: [PATCH 1/5] doc: git-checkout: clarify intro

From: Junio C Hamano <hidden>
Date: 2025-08-26 18:51:59

Junio C Hamano [off-list ref] writes:
quoted
-Updates files in the working tree to match the version in the index
-or the specified tree.  If no pathspec was given, `git checkout` will
-also update `HEAD` to set the specified branch as the current
-branch.
+`git checkout` has two main modes:
Another thing I noticed but forgot to mention.
quoted
+
+1. **Switch branches**, with `git checkout <branch>`
Does everybody really understand what it means to "switch branches"
without further explanation?

Also "<branch>" -> "(<branch> | <commit>)", perhaps, as working on
the unnamed branch (aka detached HEAD) behaves very much the same
way as working on a named branch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help