How to recover a dropped stash in Git?

前端 未结 19 2260
别跟我提以往
别跟我提以往 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条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 01:55

    You can list all unreachable commits by writing this command in terminal -

    git fsck --unreachable
    

    Check unreachable commit hash -

    git show hash
    

    Finally apply if you find the stashed item -

    git stash apply hash
    

提交回复
热议问题