From: Jonathan del Strother Date: Tue, 16 Dec 2008 12:12:52 GMT Subject: Re: Undo a git stash clear Message-ID: <57518fd10812160412j1edc2ea0mff732825f1f6c4a2@mail.gmail.com> In-Reply-To: On Tue, Dec 16, 2008 at 12:07 PM, Alexander Gladysh wrote: > Hi, list! > > 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? I ran into this exact problem on Friday. Some helpful person on IRC suggested using git fsck | grep commit | cut -d' ' -f3 | while read hash; do git rev-parse --verify --quiet $hash^2 && echo $hash; done | xargs git show Which will show a huge list of lost changes. Once you find the change you're interested in, you can cherry-pick its sha1.