git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: stash clear, was Re: git: avoiding merges, rebasing

From
Miles Bader <miles.bader@necel.com>
Date
Oct 23, 2007, 08:55 UTC
Message-ID
<buohcki6wih.fsf@dhapc248.dev.necel.com>
In-Reply-To
<Pine.LNX.4.64.0710191533490.16728@wbgn129.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
> Instead, how about writing a stash pop?  "git stash pop [<stash>]".  It 
> would literally just call git stash apply && git reflog delete.  Should 
> not be too difficult, now that I provided "git reflog delete" ;-)
>
> Maybe even deprecating "git stash clear", or doing away with it 
> altogether.
That would match my usual usage well.

Actually, I really like the way the tla (arch) "undo" and "redo" commands work: "tla undo" is roughly equivalent to "git stash", but by default chooses a name with an appended integer which is one greater than the greatest existing "stash" (to use git terminology). "tla redo" by default applies the last saved value and deletes it. So basically push and pop. Usually, of course, you only use one level, but on the occasions when you want more, it feels very natural.

I dunno how this would work with stash, but push/pop functionality would be good...

-Miles
-- 
Saa, shall we dance?  (from a dance-class advertisement)
Previous: Johannes SchindelinNext: Bruno Haible
Message 7 of 15 in “Re: git: avoiding merges, rebasing”
  1. Eric BlakeOct 2, 2007
  2. making "git stash" safer to useBruno Haible, Oct 3, 2007
  3. Junio C HamanoOct 3, 2007
  4. Joachim B HagaOct 4, 2007
  5. David KastrupOct 4, 2007
  6. stash clear, was Re: git: avoiding merges, rebasingJohannes Schindelin, Oct 19, 2007
  7. Miles BaderOct 23, 2007
  8. Bruno HaibleOct 3, 2007
  9. Benoit SIGOUREOct 8, 2007
  10. Benoit SIGOUREOct 8, 2007
  11. Johannes SchindelinOct 9, 2007
  12. Benoit SIGOUREOct 9, 2007
  13. Bruno HaibleOct 9, 2007
  14. GNU-style ChangeLog merge driver for Git (was: Re: git: avoiding merges, rebasing)Benoit SIGOURE, Oct 9, 2007
  15. Bruno HaibleOct 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.