git

Guide Git workflows for atomic commits, rebasing, blame, and bisect.

1|Updated Feb 19, 2025
One-click install
npx skills add https://github.com/trystan2k/favoritable-old --skill git-trystan2k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git
Source: https://github.com/trystan2k/favoritable-old/tree/main/.agents/skills/git
Command: npx skills add https://github.com/trystan2k/favoritable-old --skill git-trystan2k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git workflows are fraught with risk: messy commit histories make code reviews painful, risky rebases can lose work, and tracking down when a bug was introduced can take hours of manual searching. This Skill eliminates those pain points with guided, safe workflows for every common Git operation.

Core Features & Use Cases

  • Atomic Commit Management: Automatically detects your project's commit message style and groups changes into logical, atomic commits with fixup support.
  • Safe History Rewriting: Guides you through rebases, squashes, and branch cleanup with built-in safety checks to avoid overwriting shared history.
  • Fast Change Attribution: Quickly find who wrote a line of code, when a specific change was added, or which commit introduced a bug using Git blame, bisect, and log search tools.
  • Use Case: You have a feature branch with 12 messy, unorganized commits and need to clean it up before opening a PR, or you need to find the exact commit that broke a login flow – this Skill walks you through the process step by step.

Quick Start

Use the git skill to clean up your current feature branch's commit history into atomic, review-ready commits before pushing to remote.

Frequently Asked Questions about git

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

FAQPage Schema
How do I clean up messy commit history before opening a pull request?

You can clean up messy commit history by grouping changes into logical, atomic commits with fixup support and using interactive rebasing to squash branches. This step-by-step workflow detects your project's commit message style to ensure review-ready branches.

What is the best way to find which commit introduced a bug in Git?

The best way to find which commit introduced a bug is using Git bisect. This workflow walks you step by step through binary searching your commit history, quickly tracking down the exact commit that broke a specific feature or flow.

How does Git bisect work for tracing bug origins?

Git bisect traces bug origins by binary searching through your commit history. It guides you through marking good and bad commits, automatically checking out intermediate versions until the exact commit that introduced the bug is identified.

Can I safely rewrite shared branch history with an interactive rebase?

You can safely rewrite branch history with an interactive rebase using built-in safety guardrails. The workflow includes safety checks for force pushes and main branch protection to prevent overwriting shared history during squashes and branch cleanup.

How do I find who wrote a specific line of code or when a change was added?

To find who wrote a line of code or when a change was added, use Git blame and log search tools. These fast change attribution workflows quickly identify the author and timestamp of specific lines within your repository.

When should I avoid force pushing during a Git rebase?

Avoid force pushing during a Git rebase when working on shared branches, as it can overwrite collaborative history. The workflow enforces safety guardrails to prevent force pushes and protect main branches from risky rebase operations.