I'm using git mergetool with beyondcompare4 for solving git merge conflicts. In my project files I often have tags for date/time/version-list that always gives me an merge conflict. I would like to automate the resolutions of those conflicts. For e.g. selecting the latest date, or highest version number (there's a clear logic that i could script).
How could I achieve it?
Here's what i tried so far:
I tried to look for the git hook, but found none that fits my purpose. There's nothing like pre-merge hook
I wrote powershell script that loops through the merge conflicts, solves them according to my logic, and stages the changes. It works well if it's the only conflict within the file. If there are more conflicts, I cannot stage the changes, since it will stage conflicts as well. On another hand, if I run
git mergetool
after executing my script, BC4 ignores the changes the script have done, and shows those lines as conflicts.Looked for possibilities to run custom script using BC4 but it seems it does not have such a feature.
Any help appreciated,
Gintautas