Re: [PATCH 1/5] doc: git-checkout: clarify intro
- From
Julia Evans <julia@jvns.ca>
- Date
- Aug 28, 2025, 22:34 UTC
- Message-ID
- <f440d0e4-0754-49a0-9677-980f60a5dbf5@app.fastmail.com>
- In-Reply-To
- <CALnO6CCvD-uoan=-VW+OmfCk5cLgNm=zENAejL9vX2czahMGxg@mail.gmail.com>
Show 11 quoted lines
> I think we've dropped the bit about the default interpretation of "git > checkout <something>". Maybe > > When you run `git checkout <something>`, Git tries to guess whether > `<something>` is intended to be a branch, a commit, or a set of file(s), > and then switches branches, switches commits, or restores the files. > > By default, Git interprets `<something>` as a _<tree-ish>_. > [explain what choosing a tree-ish means for the user?] > > [Your notes on disambiguation as before]
Thanks, will fix. Though I don't think it's accurate that Git will treat <something> as a <tree-ish> in this context, since `git checkout <tree>` is not valid. Will find a different wording. (I get "fatal: Cannot switch branch to a non-commit")