# Recover a stash

2 messages from 2007-10-24 to 2007-10-24. Participants: Medve Emilian-EMMEDVE1, Johannes Schindelin.
Thread: https://gitlist.dev/t/10452

## Medve Emilian-EMMEDVE1, 2007-10-24 17:26

Subject: Recover a stash
Message-ID: <598D5675D34BE349929AF5EDE9B03E27016E5841@az33exm24.fsl.freescale.net>
URL: https://gitlist.dev/e/598D5675D34BE349929AF5EDE9B03E27016E5841%40az33exm24.fsl.freescale.net

```
Hello,


Is there any way to recover a stash as a... stash? I accidently removed
a stash I still need and I'd like to recover it as a stash. I can see
the dangling commit objects in the database with git lost-found and I
can have a branch/head point at them, but it's not understood as stash
anymore.


Thank you,
Emil.

```

## Johannes Schindelin, 2007-10-24 17:42

Subject: Re: Recover a stash
Message-ID: <Pine.LNX.4.64.0710241841080.25221@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0710241841080.25221%40racer.site
In-Reply-To: <598D5675D34BE349929AF5EDE9B03E27016E5841@az33exm24.fsl.freescale.net>

```
Hi,

On Wed, 24 Oct 2007, Medve Emilian-EMMEDVE1 wrote:

> Is there any way to recover a stash as a... stash? I accidently removed 
> a stash I still need and I'd like to recover it as a stash. I can see 
> the dangling commit objects in the database with git lost-found and I 
> can have a branch/head point at them, but it's not understood as stash 
> anymore.

You should be able to recover it with

	git update-ref refs/stash <commit>

Where the <commit> points to the merge commit of the stashed index and the 
stashed working directory.

Hth,
Dscho

```
