git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/3] git-checkout.txt: document -d short option for --detach

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 7, 2020, 00:02 UTC
Message-ID
<20200907000222.4717-2-sunshine@sunshineco.com>
In-Reply-To
<20200907000222.4717-1-sunshine@sunshineco.com>

`git checkout` learned -d as short option for --detach in 163e3b2975 (switch: add short option for --detach, 2019-03-29) but the documentation was never updated to reflect the change.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-checkout.txt | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 5b697eee1b..afa5c11fd3 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -198,6 +198,7 @@ Use `--no-guess` to disable this.
 	Create the new branch's reflog; see linkgit:git-branch[1] for
 	details.
 
+-d::
 --detach::
 	Rather than checking out a branch to work on it, check out a
 	commit for inspection and discardable experiments.
-- 
2.28.0.618.gf4bc123cb7
Previous: Eric SunshineNext: Eric Sunshine
Message 8 of 9 in “worktree: add -d shorthand for --detach & improve documentation”
  1. 0/3 worktree: add -d shorthand for --detach & improve documentationEric Sunshine, Sep 4, 2020
  2. 2/3 worktree: add -d short option for --detachEric Sunshine, Sep 4, 2020
  3. 1/3 git-checkout.txt: document -d short option for --detachEric Sunshine, Sep 4, 2020
  4. 3/3 git-worktree.txt: discuss branch-based vs. throwaway worktreesEric Sunshine, Sep 4, 2020
  5. Junio C HamanoSep 6, 2020
  6. 0/3 worktree: teach `add` -d for --detach & improve documentationEric Sunshine, Sep 7, 2020
  7. 2/3 worktree: teach `add` to recognize -d as shorthand for --detachEric Sunshine, Sep 7, 2020
  8. 1/3 git-checkout.txt: document -d short option for --detachEric Sunshine, Sep 7, 2020
  9. 3/3 git-worktree.txt: discuss branch-based vs. throwaway worktreesEric Sunshine, Sep 7, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.