How to recover a dropped stash in Git?

前端 未结 19 1706
别跟我提以往
别跟我提以往 2020-11-22 01:42

I frequently use git stash and git stash pop to save and restore changes in my working tree. Yesterday I had some changes in my working tree that I

19条回答
  •  -上瘾入骨i
    2020-11-22 02:08

    Windows PowerShell equivalent using gitk:

    gitk --all $(git fsck --no-reflog | Select-String "(dangling commit )(.*)" | %{ $_.Line.Split(' ')[2] })

    There is probably a more efficient way to do this in one pipe, but this does the job.

提交回复
热议问题