git - git 错误:`could not revert`,但没有详细信息
问题描述
我正在尝试git revert
之前的提交。我收到此错误:
error: could not revert a135537... commit msg
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
没有列出任何冲突。我想也许我必须在一个新的工作目录中工作,所以我隐藏了所有新的更新,但仍然只是得到这个消息。有任何想法吗?
解决方案
两者git cherry-pick
和git revert
都是 Git 内部的合并操作(请参阅Does git cherry-pick mean this?)。因此,它们可能会产生合并冲突。当他们这样做时,您必须解决这些合并冲突,然后使用git cherry-pick --continue
orgit revert --continue
来恢复操作。
您应该在零件之前获得有关实际冲突的公告error: ...
。
如果您正在挑选或恢复单个提交,您可以使用 完成操作(在解决合并冲突之后)git commit
,否则请确保使用正确的命令 with--continue
以便操作继续执行任何剩余的提交以复制 ( cherry-pick
) 或返回出(revert
)。
推荐阅读
- r - R中有没有办法对具有不同缺失观察模式的列进行求和?
- c++ - const 方法和自定义迭代器
- email - 在 SuiteCRM 7.6.6 中禁用电子邮件模板的 Mozaik / TinyMCE 编辑器
- python - 使用 .get() 后 Python 变量返回为空白
- python - 当它替换数据框中的值时,[] 是什么意思?
- java - Kotlin 中的压缩字节 []。Java 代码到 Kotlin
- r - 有没有办法将开始和结束时间列组合到 R 中的单个日期时间列(带有分组数据)
- javascript - 如何在 NodeJS 中获得按计划运行的“获取”请求?
- javascript - 满足条件时如何打破 $.each() 循环
- snakemake - temp() 不能在 PBS Torque 集群上使用 snakemake