While doing lots of branch-management via rebasing I have a number of common situations that cause merge conflicts to occur for which I have developed helper scripts that resolve the situation.
When it breaks I can essentially run:
checkpatch.sh && git rebase --continue for most scenarios and continue.
Is there a hook to attach such that git could run checkpatch.sh automagically when it halts after a merge conflict?
(Minor clarification - when I say "hook" I mean in the general (emacs) sense of being able to attach my code to run, though obviously git-hooks would count. In this sense --exec in rebase would be a hook to run my code (just the hook I require))
git rerereis what you're after git-scm.com/book/it/v2/Git-Tools-Rerere This will allow you to automatically resolve the same conflicting hunks.--execto run it on every commit except that only happens after the conflict as been resolved on the previouspickstep. Or have I misunderstood your suggestion?rerereisn't what I need in this case, though if I could hook a conflict I could even automate some of thererereincantations.execlines after every commit during interactive rebase, but--execwould do the same. You're right, it only runs after successfully applying the commit. I have a weird idea but need to check it first