


This is why the notations LeGEC mentions will work and may give you extra flexibility in reading a stash. So to modify the stash is to create new commits (because commits are immutable) and rearrange the stash ref and reflog accordingly. The special ref stash points to these commits, and a "stack" of multiple stashes is maintained using the reflog (which may be a bit of a hack, but generally is effective). So taking a step back: what is involved in modifying a stash?Ī stash, really, comprises two or three temporary commits. (I suppose alternately there could be times you'd want exactly the opposite - to leave in the stash those changes that you didn't apply, so they can be applied later.) It sounds like you want the stash to remain with the changes you've selected (in case you should need to apply them again). Git checkout - .in.stashīut those commands remove the stash entirely and by contrast if I'd said git stash apply instead of pop, that leaves the stash unchanged. # maybe a 'git reset head' if the index was changed Since git stash only affects the working tree (and sometimes index), it's easy enough to selectively take changes from a stash (enough so that I initially thought you were over-thinking the problem): git stash pop It seems like the tricky part of this question revolves around what you want the stash to look like when you're done.
