I found the detailed explanation of this pattern at Junio Hamano's blog Fun with ReReRe .
The basic idea is to do a test merge on a branch that will not be kept and then use the rerere feature of git to record how conflicts are resolved then, throw away the test merge branch, and when final merging occurs the recorded merge resolutions will be automatically applied by git.