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

[PATCH] doc: emphasize stash "--keep-index" stashes staged content

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Oct 11, 2017, 08:46 UTC
Message-ID
<alpine.LFD.2.21.1710110443360.11205@localhost.localdomain>

It's not immediately obvious from the man page that the "--keep-index" option still adds the staged content to the stash, so make that abundantly clear.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 00f95fee1..037144037 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -68,8 +68,8 @@ entries and working tree files are then rolled back to the state in
 HEAD only for these files, too, leaving files that do not match the
 pathspec intact.
 +
-If the `--keep-index` option is used, all changes already added to the
-index are left intact.
+If the `--keep-index` option is used, all changes already staged in the
+index are left intact in the index, while still being added to the stash.
 +
 If the `--include-untracked` option is used, all untracked files are also
 stashed and then cleaned up with `git clean`, leaving the working directory
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Next: Junio C Hamano
Message 1 of 4 in “doc: emphasize stash "--keep-index" stashes staged content”
  1. doc: emphasize stash "--keep-index" stashes staged contentRobert P. J. Day, Oct 11, 2017
  2. Junio C HamanoOct 12, 2017
  3. Jonathan NiederOct 12, 2017
  4. Robert P. J. DayOct 12, 2017

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.