From: Jeff King <peff@peff.net>
To: Alexander Gladysh <agladysh@gmail.com>
Cc: git@vger.kernel.org, git-users@googlegroups.com
Subject: Re: Undo a git stash clear
Date: Tue, 16 Dec 2008 07:12:49 -0500 [thread overview]
Message-ID: <20081216121245.GA8432@coredump.intra.peff.net> (raw)
In-Reply-To: <c6c947f60812160407l1b2593e1pde817f5cfb091d59@mail.gmail.com>
On Tue, Dec 16, 2008 at 03:07:28PM +0300, Alexander Gladysh wrote:
> I've stashed some valuable changes and then I accidentally did git
> stash clear. (Yes, today is not my day).
>
> Is it possible to restore stashed changes?
Try git-fsck; it should report some dangling commits (i.e., commits that
are in the object db but aren't reachable by any refs). Then you can
either pull the changes out directly (try git cherry-pick -m1 $sha1) or you
can even restore it as a stash (git update-ref -m oops refs/stash
$sha1).
-Peff
next prev parent reply other threads:[~2008-12-16 12:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 12:07 Undo a git stash clear Alexander Gladysh
2008-12-16 12:10 ` Johannes Schindelin
2008-12-16 12:12 ` Jeff King [this message]
2008-12-16 12:12 ` Jonathan del Strother
2008-12-16 12:20 ` Matthieu Moy
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=20081216121245.GA8432@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=agladysh@gmail.com \
--cc=git-users@googlegroups.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).