git-oldest-ancestor

finds the oldest common ancestor between two git treeishes

It’s not easy to tell when one git branch diverged from another. Even worse, it’s not possible to give a difinitive response.

However, it is possible to generate a response that’s probably right. That’s what this script does. Give it two branches, the one you believe to be the parent, and the one you believe to be the child, and it’ll make a good guess at the first common commit in their history. That’s the commit they probably diverged at.

Usage

USAGE: git oldest-ancestor <-p parent branch> <-c child branch>
       enter 'choose' for either to interactively chose it (requires fzf).

Metadata:

Tags:

  • git
  • search