You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 88e36e4
Browse filesBrowse the repository at this point in the historyBrowse files
doc: checkout: rewrite detached HEAD state explanation
The current explanation has the following issues:
- Says detached HEAD state is useful but doesn't explain why
- Takes many paragraphs before explaining what detached HEAD state is
- It's common for users to accidentally end up in detached HEAD state,
but it doesn't explain why that might happen
- One of the UI improvements in `git switch` is to make it harder
to detach accidentally, but that isn't advertised.
See 7968bef (switch: only allow explicit detached HEAD, 2019-03-29)
- Too many confusing diagrams
Write a new explanation addressing these issues, and put it in a
standalone guide so that we can easily reference it from advice
("see `git help detachedhead`").
The result is a shorter guide that covers more material.
The framing that "Git considers commits that aren't on a branch/other
reference to be garbage" is taken from Steve Klabnik's tutorial
https://steveklabnik.github.io/jujutsu-tutorial/branching-merging-and-conflicts/anonymous-branches.html.
It's funny and it's consistent with the way Git uses the term
"garbage collection".
Signed-off-by: Julia Evans <julia@jvns.ca>
0 commit comments