1

我需要从 github 测试一些代码的旧版本(提交)。我做了 git clone 然后

git revert $id

&id 是我需要检查的版本的 ID。我收到了这个错误:

error: could not revert 9a0d90d... Version 1.2.1
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'

克隆后我没有对任何文件进行任何更改。

我究竟做错了什么?

4

1 回答 1

0

如果您要测试旧版本,则应直接从旧 id 创建一个分支

git checkout -b test $id

git revert尝试计算一个新的提交,该提交将取消自$id. 计算负合并时可能会发生冲突。
您不需要它来咨询/测试旧版本。
如果您需要在该测试的上下文中进行任何更改,您将已经在一个“ test”分支中。

于 2011-08-17T10:45:45.953 回答