Find the merge base of two commits
One step with GitLab. We can help you get access.
Look something up
Find the merge base of two commits
with GitLab
Works with AI assistants
Use GitLab: its GitLab REST Repositories API lets you find the merge base of two commits in a single step (GET /api/v4/projects/{id}/repository/merge_base). GitLab also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.
- How do I find the common ancestor commit of two branches?
- What is the merge base of two Git commits?
Say it to your AI assistant
- Find the merge base of {refs} in project {id}.
- Get the common ancestor of commits {refs} in {id}.
For your developer
GET /api/v4/projects/{id}/repository/merge_base in GitLab REST Repositories API. Full spec on APIs.io.