Re: Multiple user questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux