git config --global rerere.enabled 1 to avoid repetitive manual merging.
So what is doing git rerere exactly? It stands for reuse recorded resolution and is a configuration parameter that enables git to record your merge/rebase resolution of all conflicts and to automatically apply these records if the same conflict appears again.
But how can the same conflict happens more than once? When you just use merge commits this may occur just sporadically, when you create a merge commit and then revert it for some reasons.
But if you use rebase (highly recommended!) to get rid of all conflicts before merging your branches into master, you will sometimes run into the problem, that you need to solve the same conflict again and again. But why?
This is because
git rebase merges commit after commit of your source branch on top of the target branch. While
git merge is doing internally two “commits”, one with the entire set of changes of all commits as one single operation (no squashing), the other is the merge commit to solve the difference of the first operation set to the target branch.
You could also manually execute
git rerere every time after resolving a conflict and before doing the commit. But the easier way is to run and forget:
> git config --global rerere.enabled 1