JAEN

Git

git merge-base

SafeFind the common ancestor

git merge-base <a> <b>

Finds where two branches diverged — scope diffs to 'changes since the fork' precisely.

Examples

  • git diff $(git merge-base main feature)..featureDiff only post-fork changes

Syntax

git merge-base <branch1> <branch2>

Before you run it

Read only.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store