撤消意外的混帐藏匿stream行

在做一个复杂的合并之前,我隐藏了一些局部变化,做了合并,然后在运行git stash pop之前愚蠢地忘记了提交。 stream行创build了一些问题(在一个大的代码库中调用的方法不好),这些问题很难追查到。 我跑git stash show ,所以我至less知道哪些文件被改变。 如果没有别的,我想这是一个提供更多的教训。

我的问题:是否有可能撤消隐藏popup而不撤销合并?

尝试使用如何恢复在Git中丢弃的存储? find你藏起来的东西 我认为总是存在两个提交,因为它保留了索引和工作副本(索引提交常常是空的)。 然后git show他们看到diff并使用patch -R来取消应用它们。

git stash --help

 Recovering stashes that were cleared/dropped erroneously If you mistakenly drop or clear stashes, they cannot be recovered through the normal safety mechanisms. However, you can try the following incantation to get a list of stashes that are still in your repository, but not reachable any more: git fsck --unreachable | grep commit | cut -d\ -f3 | xargs git log --merges --no-walk --grep=WIP 

这有助于我比同样的情况下接受的答案更好。