From: Dennis Schridde <devurandom@gmx.net>
To: Brandon Casey <casey@nrlssc.navy.mil>
Subject: Re: Multiple user questions
Date: Sat, 7 Jun 2008 00:15:29 +0200 [thread overview]
Message-ID: <200806070015.29709.devurandom@gmx.net> (raw)
In-Reply-To: <fa67IkKd22OcyCOfHZx_EORkS5DPZLP5IEWlE3dg-pOOdKgeIL0hpA@cipher.nrlssc.navy.mil>
[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]
Am Freitag, 6. Juni 2008 23:19:49 schrieben Sie:
> 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.
It was indeed too late. (I assumed to have rerecorded the stash, but later
realised that the new stash contained only parts of the changes.)
I am now using this script:
for commit in $(git fsck --full --lost-found | grep commit | awk '{print
$3}') ; do
git show ${commit} | head -n7 | \
grep "On ${branch}:" | grep "${message}" > /dev/null \
&& git show ${commit} | head -n7
done
Though that list grows pretty long, so I would like to cut down the output of
fsck-lost-found after I am sure nothing worthy is "lost" anymore.
--Dennis
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-06-06 22:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 20:47 Multiple user questions Dennis Schridde
2008-06-06 21:19 ` Brandon Casey
2008-06-06 22:15 ` Dennis Schridde [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-05-23 11:27 Dennis Schridde
2008-05-23 11:37 ` Dennis Schridde
2008-05-24 1:30 ` Jakub Narebski
2008-05-24 9:13 ` Dennis Schridde
2008-05-24 12:33 ` Jakub Narebski
2008-05-25 8:49 ` Dennis Schridde
2008-05-27 8:24 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200806070015.29709.devurandom@gmx.net \
--to=devurandom@gmx.net \
--cc=casey@nrlssc.navy.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.