搜索

430

主题

515

帖子

2134

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2134
QQ
发表于 2020-8-11 20:44:15 3768 浏览 0 回复

Git 合并 patch 时的如何处理冲突

本帖最后由 tangh 于 2020-8-11 20:45 编辑

比如,我需要git am 一个patch,操作和提示如下:
  1. tangh@xy02:/a1/tangh/6762/XY001/alps-release-p0.mp1-V5$ git am ../alps-release-p0.mp1/0017-.patch
  2. Applying: 后副摄效果修改
  3. XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:575: trailing whitespace. 0, // i4HDRConvergeThr
  4. XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:1496: trailing whitespace.0, // i4HDRConvergeThr
  5. XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:2417: trailing whitespace.0, // i4HDRConvergeThr
  6. XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:3338: trailing whitespace.0, // i4HDRConvergeThr
  7. XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:4259: trailing whitespace.0, // i4HDRConvergeThr
  8. .............................
  9. error: vendor/mediatek/proprietary/custom/mt6765/hal/imgsensor/ver1/imx298_mipi_raw/AWB_Tuning_Para/camera_awb_tuning_para_vdo_ov8858mipiraw.cpp: patch does not apply
  10. Patch failed at 0001 后副摄效果修改
  11. The copy of the patch that failed is found in:
  12.    /a1/tangh/6762/XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch
  13. When you have resolved this problem, run "git am --continue".
  14. If you prefer to skip this patch, run "git am --skip" instead.
  15. To restore the original branch and stop patching, run "git am --abort".
复制代码



解决该问题的方法:
1、先手工执行git apply --reject ../alps-release-p0.mp1/0017-.patch
2、然后git add -A .
3、执行git am --resolved

执行完之后,git log --oneline 照样可以看到patch的commit id;



手机微信同号:13682654092
回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


登录或注册
快速回复 返回顶部 返回列表