我正在尝试使用以下方式应用特定的存储:
git stash apply stash@{2}
但最终出现这个错误:
fatal: ambiguous argument 'stash@': unknown revision or path not in the working tree.
我有很多 stash 的条目,如果我做一个 git stash list
超过 20我不确定这个错误试图告诉我什么,有人可以进一步建议吗?谢谢
最佳答案
您需要引用该字符串,因为您的 shell 正在将 {}
的内容作为扩展。所以使用 git stash apply 'stash@{2}'
。或者,您可以使用存储的 SHA,或者下次应用时,您可以自己命名存储。
关于git stash apply @stash{x} 不适合我,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31297108/