error: Reverting is not possible because you have unmerged files
error: Reverting is not possible because you have unmerged files
尝试还原 git 中的特定提交时,出现此错误:
$ git revert aaaf93201a28a57d540d633b1b723b8e513a47ed
error: Reverting is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm '
hint: as appropriate to mark resolution and make a commit.
fatal: revert failed
这是关于合并冲突吗?但是为什么在那种情况下它说 "unmerged files" 呢?
这是关于合并冲突,来自您之前尝试的一些合并。未合并的文件是发生合并冲突的文件。
如错误消息中所述,您应该在执行任何其他操作之前处理好这些文件和其中包含的冲突。另一个选项是进行硬重置 - 仅当您知道自己在做什么时才尝试此操作。
如果您想恢复到以前的工作状态,请执行以下操作:git merge --abort
尝试还原 git 中的特定提交时,出现此错误:
$ git revert aaaf93201a28a57d540d633b1b723b8e513a47ed error: Reverting is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm ' hint: as appropriate to mark resolution and make a commit. fatal: revert failed
这是关于合并冲突吗?但是为什么在那种情况下它说 "unmerged files" 呢?
这是关于合并冲突,来自您之前尝试的一些合并。未合并的文件是发生合并冲突的文件。
如错误消息中所述,您应该在执行任何其他操作之前处理好这些文件和其中包含的冲突。另一个选项是进行硬重置 - 仅当您知道自己在做什么时才尝试此操作。
如果您想恢复到以前的工作状态,请执行以下操作:git merge --abort