git-find-fork

Find a Git branch's true fork point after rebases or squashes.

31|6|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/WaterplanAI/agentic-config --skill git-find-fork-waterplanai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-find-fork
Source: https://github.com/WaterplanAI/agentic-config/tree/main/core/skills/git-find-fork
Command: npx skills add https://github.com/WaterplanAI/agentic-config --skill git-find-fork-waterplanai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers determine where a Git branch diverged from its true fork point, even after history rewrites like rebases or squashes, and when the parent reference is unclear.

Core Features & Use Cases

  • Robust fork-point detection across rebased or rewritten histories.
  • Handles unknown or ambiguous parent branches and non-linear histories.
  • Outputs the fork point and related metadata to assist auditing and rollback decisions.

Quick Start

Use the Git Find Fork skill to determine the fork point for the current branch by running the included workflow commands in your repository.

Frequently Asked Questions about git-find-fork

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the fork point of a Git branch after a rebase?

The fork point is the commit where your branch diverged from its parent, even after rebases or squashes rewrite history. Git Find Fork uses git merge-base and git reflog to identify this true divergence point when parent references are unclear, accounting for history rewrites that obscure the original branch point.

Can I determine a branch's fork point when the parent branch is unknown?

Yes. Git Find Fork handles ambiguous or unknown parent branches by analyzing commit history and reflog data to derive the fork point without requiring an explicit parent reference, making it useful for branches with unclear lineage or non-linear histories.

What's the difference between merge-base and the true fork point of a branch?

Merge-base finds the common ancestor between branches, but rebase and squash operations rewrite history, making merge-base unreliable for the true fork point. Git Find Fork detects actual divergence by examining reflog and commit history to account for these rewrites.

How do I audit a branch's history to understand what changed since it forked?

Identify the fork point first using Git Find Fork to establish the baseline commit. Once you have the true divergence point, you can compare branch lineage and changes against that commit, enabling accurate auditing and rollback decisions.

Does fork-point detection work with non-linear or complex Git histories?

Yes. Git Find Fork handles non-linear histories and complex rebasing scenarios by relying on git reflog and merge-base analysis rather than simple parent tracking, making it robust across ambiguous branching patterns.

Why would I need fork-point detection instead of just checking the branch creation date?

Branch creation date doesn't reflect actual divergence, especially after rebases and squashes rewrite history. Fork-point detection finds where code actually split, which is critical for accurate change tracking, auditing, and deciding what to include in rollbacks or cherry-picks.