Recover a stash

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Recover a stash

From: Medve Emilian-EMMEDVE1 <hidden>
Date: 2016-06-15 22:43:44

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.

Re: Recover a stash

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:44

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help