You are looking for git merge-base
. Usage:
$ git merge-base branch2 branch3
050dc022f3a65bdc78d97e2b1ac9b595a924c3f2
More Related Contents:
- How to clone all remote branches in Git
- Branch from a previous commit using Git
- How to replace master branch in Git, entirely, from another branch? [duplicate]
- Modified files in a git branch are spilling over into another branch
- Default behavior of “git push” without a branch specified
- What is the difference between origin and upstream on GitHub?
- Why does git perform fast-forward merges by default?
- Deleting a badly named git branch
- Rename master branch for both local and remote Git repositories
- Create a branch in Git from another branch
- How do I copy a version of a single file from one Git branch to another?
- fetch in git doesn’t get all branches
- How do I rename both a Git local and remote branch name?
- Move branch pointer to different commit without checkout
- Is there a way to lock a branch in GIT
- How do I get the current branch name in Git?
- How do I create a remote Git branch?
- What are the differences between local branch, local tracking branch, remote branch and remote tracking branch?
- Creating a new empty branch for a new project
- How do I commit only some files?
- What is the difference between “git branch” and “git checkout -b”?
- Git submodule to track remote branch
- git switch branch without discarding local changes
- git how to find commit hash where branch originated from
- Update Git branches from master
- Git remote branch deleted, but still it appears in ‘branch -a’
- How do I list all remote branches in Git 1.7+?
- How do I run git log to see changes only for a specific branch?
- How to pull remote branch from somebody else’s repo
- Commit a file to a Different Branch Without Checkout