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

Usability of git stash

From
AMAnders Melchiorsen <mail@cup.kalibalik.dk>
Date
Oct 15, 2008, 19:24 UTC
Message-ID
<87wsg9acfv.fsf@cup.kalibalik.dk>
I find the UI of git stash quite unfortunate.

First, I would prefer list to be the default action, so that typing "git stash" in the hope of getting some help would not make me lose my local changes.

When trying to recover from that scenario, I do "git stash apply" as recommended by the "git stash" output. Now I still lost my index state, all changes are unstaged.

The "git command subcommand" syntax seems different from other git commands. For example, you do not delete a branch with "git branch delete".

The default naming of stashes makes it hard to remember what I was actually working on. Forcing me to give it a description (like branch and commit do) would probably have saved me some time overall.

And finally, a "git stash clear" has quite far-reaching consequences. Most other mistakes are easy to recover from, but not this one.

I offer these observations just for discussion. It has not been possible for me to think of any backwards compatible improvements, other than staying away from "git stash".

Cheers, Anders.

Next: Brandon Casey
Message 1 of 15 in “Usability of git stash”
  1. Anders MelchiorsenOct 15, 2008
  2. Brandon CaseyOct 15, 2008
  3. David KastrupOct 16, 2008
  4. Brandon CaseyOct 16, 2008
  5. Anders MelchiorsenOct 18, 2008
  6. Shawn O. PearceOct 19, 2008
  7. Leo RazoumovOct 19, 2008
  8. Shawn O. PearceOct 19, 2008
  9. Stephan BeyerOct 19, 2008
  10. Miles BaderOct 20, 2008
  11. Jeff KingOct 20, 2008
  12. Junio C HamanoOct 20, 2008
  13. Miles BaderOct 20, 2008
  14. Andreas EricssonOct 20, 2008
  15. Brandon CaseyOct 20, 2008

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.