当我尝试时,如何在一个存储库中:git reset head~1
,这将删除最新的提交。在不同的存储库(github)上,它给我以下错误消息:
fatal: ambiguous argument 'head~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
git reset HEAD~1
HEAD
,而不是head
。
或者只是@
:
git reset @~1