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

Re: error(?) in "man git-stash" regarding "--keep-index"

From
SPSybille Peters <sypets@gmx.de>
Date
May 18, 2018, 15:37 UTC
Message-ID
<96486abe-cf13-ef10-7513-2d6c20a9dc1e@gmx.de>
In-Reply-To
<CAN0heSpVKd=-Dpdk09LVtTd0vC2dLUwg0=hbxhKskM3RencsYA@mail.gmail.com>
My 2c on this:
1) "If the --keep-index option is used, all changes already added to the 
index are left intact" (manpage git stash)
That appears to be correct and clear
2) "$ git stash push --keep-index    # save *all other* changes to the 
stash" (manpage git stash)

That is either not correct or misleading. "All other" implies in my opinion all changes

except the ones that were already added. *"All changes including already staged changes"*

might be a better choice.
Please also see open question on StackOverflow:
https://stackoverflow.com/questions/50242489/how-to-ignore-added-hunks-in-git-stash-p/
Previous: Martin ÅgrenNext: Robert P. J. Day
Message 5 of 9 in “error(?) in "man git-stash" regarding "--keep-index"”
  1. Robert P. J. DayMay 18, 2018
  2. Martin ÅgrenMay 18, 2018
  3. Robert P. J. DayMay 18, 2018
  4. Martin ÅgrenMay 18, 2018
  5. Sybille PetersMay 18, 2018
  6. Robert P. J. DayMay 18, 2018
  7. Martin ÅgrenMay 18, 2018
  8. Sybille PetersMay 19, 2018
  9. Robert P. J. DayMay 18, 2018

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.