On Tue, Nov 19, 2013 at 5:50 PM, Tim Chase <g...@tim.thechases.com> wrote:
> Having lost "add -p" work enough times when stashing, I finally
> dug into the docs to see how to prevent it, discovering that
> "--keep-index" does exactly what I want.

Note that 'git stash (pop | apply) --index' will reinstate the index
as it was at stash time, regardless of whether '--keep-index' was used
to create the stash.  In other words, your index is not "lost" when
you stash.

Also note: when you 'git stash --keep-index', although your index
remains intact, the changes in the your index still become part of the
stash.  Hence, any changes to the indexed portion of your files after
a stash usually result in a conflict on subsequent 'git stash pop'.
This confuses me quite a lot, since I'd expect a main use case of 'git
stash --keep-index' to be fixing a up a commit, but then any fixes
cause a conflict :P

Cheers,

-nathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to