find_merge_base
Find the common ancestor commit between two Git refs and report ahead/behind counts to check branch divergence before merging or comparing histories. Returns mergeBaseSha, aheadBy, and behindBy.
Instructions
Finds the common ancestor commit (merge base) between two git refs and reports ahead/behind commit counts. Use to check branch divergence before merging or comparing histories. Returns mergeBaseSha, aheadBy, behindBy, and status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Base branch, tag, or commit SHA. | |
| head | Yes | Head branch, tag, or commit SHA. | |
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner (organization or user). |