git-forensics

Trace code changes and authorship using git log, blame, and bisect.

9|5|Updated Aug 8, 2025
One-click install
npx skills add https://github.com/AnExiledDev/CodeForge --skill git-forensics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-forensics
Source: https://github.com/AnExiledDev/CodeForge/tree/main/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics
Command: npx skills add https://github.com/AnExiledDev/CodeForge --skill git-forensics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Git forensics answers questions that code alone cannot: who last touched a piece of logic, when a change occurred, and why it happened. The history doesn't just record what changed — it records who changed it, when, and (if commit messages are good) why they changed it.

Core Features & Use Cases

  • History discovery: use commands like git log, git blame, and git show to trace changes, authors, and context across commits.
  • Regression and change tracing: leverage git bisect, git log with -S/-G, and git blame for pinpointing when behavior changed.
  • Recovery, auditing, and ref movement: use git reflog to recover lost work, track ref updates, and understand renames/merges over time.

Quick Start

Start by running basic investigations with git blame and git log to trace changes in your repository.

Frequently Asked Questions about git-forensics

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

FAQPage Schema
How do I trace when a specific bug was introduced in my git repository?

Pinpoint bug regressions in git by running git bisect to binary search commits, or use git log with -S/-G to find when specific changes occurred. This identifies the exact commit where behavior shifted.

Can I recover lost commits after a hard reset or branch deletion?

Recover lost commits by querying git reflog to track ref updates and locate dangling commits. This allows you to restore work that appears deleted after resets or branch deletions.

How does git blame help with verifying code authorship?

Git blame identifies who last touched a piece of logic by displaying the author and commit hash for each line. This verifies authorship and provides context for why changes happened.

What is the best way to follow file renames when tracing git history?

Follow file renames during git history discovery by using git log with rename detection options. This traces changes, authors, and context across commits even when files are moved.

How do I understand complex merge histories across git repositories?

Understand complex merge histories by using git log and git show to trace commit context and visualize branch integrations. This clarifies how different branches converged over time.

Does git reflog work for tracking all ref updates in a local repository?

Git reflog tracks local ref updates like branch checkouts and resets, enabling recovery and auditing. It records ref movements locally, providing a detailed history of repository state changes.