git reset 询问“更多?" [英] git reset asks 'more?'
问题描述
Git windows 命令行,版本 1.8.0
Git windows command line, version 1.8.0
到目前为止我有 3 次提交,当我输入时
I have 3 commits so far and when I type
git reset --soft HEAD^
新行出现
More?
和闪烁的输入光标
然后,无论我输入什么,我总是得到
Then, whatever I type, I always get
fatal: 模棱两可的论点 'HEAD': 未知修订版或不在工作树中的路径.使用--"将路径与修订分开,如下所示:'git [...] -- [...]
fatal: ambiguous argument 'HEAD ': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]
所有其他命令在同一文件夹中都可以正常工作.
All other commands works fine in the same folder.
推荐答案
查看 git log HEAD^
是否有效.如果没有,则可能与您的本地化或终端有关.它似乎正在过滤掉 ^
符号.作为一种解决方法,现在使用 git reset --soft HEAD~1
.
see if git log HEAD^
works. If it doesn't, it may be something with your localization or terminal. It seems to be filtering out the ^
symbol. As a workaround, use git reset --soft HEAD~1
for now.
这篇关于git reset 询问“更多?"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!