|
发表于 2020-8-11 20:44:15
3765 浏览 0 回复
Git 合并 patch 时的如何处理冲突
本帖最后由 tangh 于 2020-8-11 20:45 编辑
比如,我需要git am 一个patch,操作和提示如下:
- tangh@xy02:/a1/tangh/6762/XY001/alps-release-p0.mp1-V5$ git am ../alps-release-p0.mp1/0017-.patch
- Applying: 后副摄效果修改
- XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:575: trailing whitespace. 0, // i4HDRConvergeThr
- XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:1496: trailing whitespace.0, // i4HDRConvergeThr
- XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:2417: trailing whitespace.0, // i4HDRConvergeThr
- XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:3338: trailing whitespace.0, // i4HDRConvergeThr
- XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch:4259: trailing whitespace.0, // i4HDRConvergeThr
- .............................
- 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
- Patch failed at 0001 后副摄效果修改
- The copy of the patch that failed is found in:
- /a1/tangh/6762/XY001/alps-release-p0.mp1-V5/.git/rebase-apply/patch
- When you have resolved this problem, run "git am --continue".
- If you prefer to skip this patch, run "git am --skip" instead.
- 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
|
|
|
|
|
登录或注册
|