Hello all,

My first message here. After switching from svn/hg to git and getting some 
experience, I feel I'm ready to figure out which questions aren't too 
obvious. My feeling is the current question isn't.

Today I was hacking away, only to discover that I was really working on too 
much stuff at once. I wanted to stash away a sub-set of my changes, and 
leave the rest to focus on first. So I did a 'git stash --patch', selected 
the patches I wanted to move away for now. Only to discover that I stashed 
away 2 patches too many .... Bummer.

Alas: I kind of hoped I could do something like 'git stash apply --patch 
stash@{1}'...... but that didn't quite work: I just got the full stash 
applied on top of the working directory (to be verbose: this was done after 
stashing the remaining patches).
I hope my situation was explained clearly enough. My question is not about 
how to recover. That's easy by redoing the original stash command, but 
properly this time. My question is more about learning something more about 
git, in case I end up in the same, or a similar situation in the future:
* is there a way to force 'git stash --patch' to create a separate stash 
for each patch that I select? This would make it possible to apply each 
patch again afterwards, and would have been a perfect solution in my case 
as well
* otherwise, is there a way to achieve the result I had hoped for when 
running 'git stash apply --patch', namely to selectively apply hunks

In case the answer to both of these is 'No', what would be the proper way 
and/or place to suggest such a feature?

Jakob van Bethlehem

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to