git - How can I see what "previous resolution" git applied?
问题描述
When cherry-picking a commit with similar resolutions to a previously resolved patch I sometime see git saying it tried to re-apply what I'd done earlier. I believe this is the rerere
component of git.
$ git cherry-pick ...
error: could not apply a123f6c424... [commit message]
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'
Resolved 'path/to/file.c' using previous resolution.
The problem is I don't trust my previous resolution. How can I see what the "previous resolution" did? I.e. the diff of just the conflicting areas.
I know I can re-do the merge completely with the following commands. However, I don't want to completely throw away the previous work, just review and validate it.
git rerere forget path/to/file.c
git checkout -m path/to/file.c
# Resolve. e.g., git mergetool
The following questions are similar but are for merge commits, not conflicts in general or uncommitted changes.
解决方案
推荐阅读
- c# - 使用实体框架更新表中记录列表的正确方法
- rsync - 为什么此 rsync 命令会生成一个列表,其中每个文件后跟: Permission denied
- networking - 路由器如何将数据包路由到他们从未联系过的很远的目的地?
- web - 我将如何编写用户脚本以接收来自网站的桌面通知?
- ios - 在核心数据中显示更新的实体值
- android - 在构建时下载 Android 字符串资源
- jquery - 我在检索 jquery 数据属性的值时遇到问题。我究竟做错了什么?
- r - 如何创建一个在 R 中绘制径向线的函数?
- javascript - 如何在 Create-React App 项目中使用 ReactJS for Web 上的 React-Native-Vector-Icons
- c - 读取csv并在C中返回二维数组的函数