We already had short discussion about common ancestors on jgit-dev list and according to this[1] Shawn's answer getting fist common ancestor is the best solution.

In case of naming strategy for variants. Team framework used to use 'local', 'base', and 'remote' names for variants where 'local' determinate locally stored file version. In case of git the 'local' in some cases can be version from branch that isn't current HEAD, even more we could exclude locally made changes from synchronization result. Therefore I've decided to use 'ancestor', 'base' and 'remote' names.

1. http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00435.html