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

Re: Multiple user questions

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 6, 2008, 21:19 UTC
Message-ID
<fa67IkKd22OcyCOfHZx_EORkS5DPZLP5IEWlE3dg-pOOdKgeIL0hpA@cipher.nrlssc.navy.mil>
In-Reply-To
<200806062247.42074.devurandom@gmx.net>
Dennis Schridde wrote:
> I just ran into a lost stash again and thus would like to get an answer to 
> this question, which was forgotten last time:
> (lost-found is really growing in a pace it will take me very long to find my 
> lost stash.)
How did you lose it?

If you did 'git stash drop' and then realized that you dropped the wrong stash, you can apply that stash and then recreate it since 'stash drop' also prints out the sha1 and 'stash apply' can use that.

For example:
   # edit edit edit
   $ git stash
   # hmm I don't need that old stash anymore
   $ git stash drop
   Dropped refs/stash@{0} (5dcea62df980fa157e7755f82125dfc3bbd52ff5)
   # whoops I didn't mean to drop _that_ stash
   $ git stash apply 5dcea62df980fa157e7755f82125dfc3bbd52ff5
   $ git stash

Of course, that only works if you realize pretty quickly that you dropped the wrong stash. Also realize my example was rather simplified and the working directory may need to be prepped before reapplying the dropped stash.

-brandon
Previous: Dennis SchriddeNext: Dennis Schridde
Message 2 of 3 in “Re: Multiple user questions”
  1. Dennis SchriddeJun 6, 2008
  2. Brandon CaseyJun 6, 2008
  3. Dennis SchriddeJun 6, 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.