why don't you directly use org.eclipse.jgit.merge.MergeStrategy ?