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. It will result in cherry-pick conflicts. So over-riding means, the script should take that file from the third changeid.
Asked
Active
Viewed 224 times
1 Answers
1
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.
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
I recommending of writing a script that will do what you asking it to do.

CodeWizard
- 128,036
- 21
- 144
- 167
-
Is there any way to find the file which cause the merge conflict. I have seen the error info during merge conflict. It hardly says anything. And how can i override in script, can you explain in detail. – Sunil Mishra May 20 '15 at 07:44
-
Try this: `git diff --name-only --diff-filter=U` (U is for unmerged files = conflicts in your case) – CodeWizard May 20 '15 at 07:57
-
Thanks, it helped me in finding the files causing merge conflict. In script i will add these files and do a commit and proceed further. Is it the right way to override with the latest changes?. – Sunil Mishra May 20 '15 at 09:19
-
Hi again. if it helped you you can accept the answer. ill appreciate it. regarding your second part you sounds like it a good solution since its suites your needs. – CodeWizard May 20 '15 at 09:21