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

Re: Unexpected behaviour with git stash save --keep-index?

From
JFJonas Flodén <jonas.floden@gmail.com>
Date
Sep 2, 2008, 06:20 UTC
Message-ID
<g9ilut$n58$1@ger.gmane.org>
In-Reply-To
<20080902012804.GB6739@neumann>
SZEDER Gábor wrote:
 > 'git stash save --keep-index' means "save all local modifications and
 >  remove all modifications from the working tree that are not in the
 > index".  This differs substantially from "save only those
 > modifications that are not in the index, and then remove them from
 > the working tree".
 >

Thanks for the explanation. It seemed strange first but now I know why it does that.

 >> Also maybe someone could someone recommend a way to split an
 >> unclean working dir into several patches/commits?
 > The workflow described at the end of stash's man page (under 'Testing
 >  partial commits') works well for me.
 >

Thanks. What about the case when I already have a number of existing patches/commits and want to split the working dir into them.

Regards, Jonas

Previous: SZEDER GáborNext: Karl Hasselström
Message 5 of 6 in “Unexpected behaviour with git stash save --keep-index?”
  1. Jonas FlodénSep 1, 2008
  2. SZEDER GáborSep 2, 2008
  3. Documentation: fix disappeared lines in 'git stash' manpageSZEDER Gábor, Sep 2, 2008
  4. Documentation: minor cleanup in a use case in 'git stash' manualSZEDER Gábor, Sep 2, 2008
  5. Jonas FlodénSep 2, 2008
  6. Karl HasselströmSep 2, 2008

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.