"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Tracey Emery <tracey@traceyemery.net>
Subject:
Re: [rfc] stash command in got
To:
Mark Jamsek <mark@jamsek.com>, gameoftrees@openbsd.org
Date:
Thu, 16 Jun 2022 09:44:42 -0600

Download raw body.

Thread
On Thu, Jun 16, 2022 at 05:43:38PM +0200, Stefan Sperling wrote:
> On Thu, Jun 16, 2022 at 09:33:10AM -0600, Tracey Emery wrote:
> > On Thu, Jun 16, 2022 at 05:26:33PM +0200, Stefan Sperling wrote:
> > > Just to illustrate, in order to create a stash during a quick task context
> > > switch, you could do something like this in a script:
> > > 
> > >  mybranch=$(got br)
> > >  got branch mystash
> > >  got commit -m stash
> > >  got up -b $mybranch
> > > 
> > > What advantages would a native stash feature offer?
> > > 
> > 
> > Sure, this works in one direction. What's the quick way to pop it back
> > to mybranch? A diff has to be created and patched back to mybranch and
> > mystash deleted, correct? Or is there a quicker way in a script like
> > this?
> 
> This should work in many cases: got cherrypick mystash

Cool. :)

> 
> You can do this on any branch, so just like stash pop you don't
> need to first rewind your work tree back to the original state
> which the stashed change was based on.
> 

-- 

Tracey Emery