Options (1)
-a, --allbooleanPrint all best common ancestors of two commits
Example:
git merge-base {{[-a|--all]}} {{commit_1}} {{commit_2}}Examples (3)
Print the best common ancestor of two commits
git merge-base commit_1 commit_2Print all best common ancestors of two commits
git merge-base [-a|--all] commit_1 commit_2Check if a commit is an ancestor of a specific commit
git merge-base --is-ancestor ancestor_commit commitmade by @shridhargupta | data from tldr-pages