简体   繁体   English

如何克服樱桃挑剔冲突

[英]How to override cherry-pick conflicts

Is there any method by which we can override the cherry-pick conflicts? 有什么方法可以覆盖“樱桃挑剔”冲突? My scenario is: If user provides three changeids, and one file is common in all the three changeids. 我的情况是:如果用户提供了三个changeid,而在所有三个changeid中一个文件是公用的。 It will result in cherry-pick conflicts. 这将导致选择冲突。 So over-riding means, the script should take that file from the third changeid. 因此,最重要的是,脚本应从第三个changeid中获取该文件。

You can write a script/ hook that do it, but keep in mind that in git many commands can get multiple commit ids as valid input. 您可以编写一个脚本/钩子来执行此操作,但请记住,在git中,许多命令可以获取多个提交ID作为有效输入。

What if the given parameter is a branch name? 如果给定参数是分支名称怎么办? you will have to parse it to get the latest commit id if its not the current HEAD 如果不是当前的HEAD,则必须解析它以获得最新的提交ID

I recommending of writing a script that will do what you asking it to do. 我建议编写一个脚本,该脚本可以执行您要求的脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM