Undoing accidental git stash pop

前端 未结 3 689
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 23:34

I stashed some local changes before doing a complicated merge, did the merge, then stupidly forgot to commit before running git stash pop. The pop created some pro

3条回答
  •  春和景丽
    2021-01-29 23:55

    Try using How to recover a dropped stash in Git? to find the stash you popped. I think there are always two commits for a stash, since it preserves the index and the working copy (so often the index commit will be empty). Then git show them to see the diff and use patch -R to unapply them.

提交回复
热议问题