we are working on a project where we often get the same conflict due to git not able to merge the files correctly. However these conflicts can be easily fixed with an external script. Is it somehow possible to let git now that it always should handle merge conflicts on a file with a specific extension with an external script? The script needs the >>>> and <<<< markers from git to find the changed parts in the file, so git should call our script after it is done with it's own merge.
Does anybody know if there is a hook we could use for that or maybe you can tell git to run this script for conflicts in a specified file?
Best regards, Michael
If the merge conflict resolution is always the same, check out
git rerere
.It is described in "Rerere Your Boat..." and in "gitster's journal - Fun with rerere"
You will need to activate it though: