0

I'm an idiot. I stashed some changes to put them in a previous commit, so I rebased interactive, edited the commit, popped the stash, then realized that this would cause problems with other commits so I should just make a new commit on top. Aborted rebase and then attempted to pop the stash... which I no longer had. I lost the stash in the aborted rebase! Is there a way to get it back??

git stash
git rebase -i HEAD@{3}
(chose to edit HEAD@{2})
git stash pop
git rebase --abort
git stash pop
...

... aaaaand there's nothing to pop!

GameKyuubi
  • 681
  • 1
  • 10
  • 25
  • 1
    This will help you: http://stackoverflow.com/documentation/git/1440/stashing/12432/recover-a-dropped-stash#t=201611290743079506482 – Deepesh Nov 29 '16 at 07:43
  • Possible duplicate of [How to recover a dropped stash in Git?](http://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git) – Deepesh Nov 29 '16 at 07:44
  • A stash is just a commit (two commits, actually), so the reflog should be of some use here. Just find your stash commit, then use it. – Tim Biegeleisen Nov 29 '16 at 07:44

1 Answers1

0

In case you still have your console open or have the hash of your stash from some other source, the following topic might help.

How to recover a dropped stash in Git?

Community
  • 1
  • 1
Imantas
  • 1,621
  • 13
  • 19