【发布时间】:2018-08-19 17:08:56
【问题描述】:
如果解决方案是微不足道的,我很抱歉,但我不是 GIT 专家,我在互联网上没有找到任何东西。
我隐藏了一些更改,但我很难恢复它们。也许我发送了两次git stash 命令,我希望这不会让我失去一切。
根据this question和official documentation,我尝试了以下命令:
git stash pop
我收到了:
src/schema/schema-generator2.js: needs merge unable to refresh index
所以我尝试了:
git merge
error: Merging is not possible because you have unmerged files
然后我尝试了:
git stash apply stash@{0}
unknown option: -encodedCommand
git stash apply
src/schema/schema-generator2.js: needs merge
git stash apply --index
src/schema/schema-generator2.js: needs merge
git stash show -p stash@{0} | git apply -R
git : Too many revisions specified: 'stash@' 'MAA=' 'xml' 'xml' In riga:1 car:1 + git stash show -p stash@{0} | git apply -R + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Too many revisi...A=' 'xml' 'xml':String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError error: unrecognized input
在上面的文本中,我将消息编写为代码,并引用了答案。我希望它很清楚。
我不明白发生了什么,为什么没有任何效果?我可以做些什么来取消隐藏我的更改?
【问题讨论】:
-
你能把
git status命令的输出贴出来 -
你忘了提到你使用 PowerShell 作为 shell。在本例中,
{是 PowerShell 的特殊字符。 -
@PetSerAl 你是对的,我正在使用 VS Code,当我使用终端时,许多错误停止出现。
-
顺便说一句,我解决了这个问题,即使我无法解释如何。可能这只是 VS Code 的问题,重新启动它就足够了