【发布时间】:2014-03-03 17:23:31
【问题描述】:
我正在尝试恢复到较早的 git 提交,但收到错误“错误修订”。为什么?
这是一个抄本(作者姓名已删除):
Ellen@ELLEN-PC /c/Users/Susan Mills/git/hello-github (master)
$ git status
# On branch master
nothing to commit, working directory clean
Ellen@ELLEN-PC /c/Users/Susan Mills/git/hello-github (master)
$ git log | head
commit e3eb30cc7ca6d4cd10de755b63821cad75da1e83
Date: Wed Feb 5 17:54:32 2014 -0800
I changed my greeting.
commit 063ac580e28bab524286dac7b0a8f88d9e7d365f
Date: Mon Feb 3 07:53:19 2014 -0800
Ellen@ELLEN-PC /c/Users/Susan Mills/git/hello-github (master)
$ git revert 9e7d365f
fatal: bad revision '9e7d365f'
为什么我会收到“错误的修订”,我该怎么办?我在 Windows 7 上使用 git bash,我的来源在 github。
【问题讨论】:
标签: git git-commit git-revert