hg equivalent of git stash

anatoly techtonik techtonik at gmail.com
Mon Dec 12 10:36:06 CST 2011


On Mon, Dec 12, 2011 at 7:12 PM, Tom Anderson <tom.anderson at e2x.co.uk>wrote:

> > On Jan 12, 2008 3:27:01 pm, Matt Mackall wrote:
> >> On Sat, 2008-01-12 at 17:13 -0600, Phillip Koebbe wrote:
> >>
> >>> I was reading earlier today about "git stash" and was thinking it
> >>> would be very useful to me. Is something like that available in hg?
> >>
> >> You might be interested in mq, which is about a million times more
> >> useful.
> >
> > Among million use cases for mq, can anybody explain the mq equivalent of
> git
> > stash?
> >
> > My use case: I want to put my current changes away temporarily (into
> stash),
> > do some unrelated changes, commit them and then get my previous changes
> back
> > (removing them from stash). How do I do this with mq?
>
> Some combination of qnew, qrefresh, qpop, and qpush.
>
> Try this:
>

...


> $ hg status
> $ cat fruit
> bananas
>

Thanks, Tom. You solution is the same as Sam's - to convert my changes into
mq patch and then use mq to manage these changes. But it doesn't help to
restore my working copy into the state before I stashed the changes. 'hg
diff' and 'hg st' don't show anything.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20111212/c43c5bb4/attachment.html>


More information about the Mercurial mailing list