git-advanced-workflows

Rewrite Git commit histories using interactive rebases, cherry-picking, and reflog recovery.

27|5|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Fandry96/k3-agentic-skills --skill git-advanced-workflows-fandry96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-advanced-workflows
Source: https://github.com/Fandry96/k3-agentic-skills/tree/main/skills/git-advanced-workflows
Command: npx skills add https://github.com/Fandry96/k3-agentic-skills --skill git-advanced-workflows-fandry96

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Clean, readable Git history is essential for collaboration, code reviews, and reliable rollbacks; this skill provides structured guidance to rewrite history safely and recover from errors.

Core Features & Use Cases

  • Interactive Rebase & Commit Shaping: craft meaningful, linear commit histories by reordering, editing, squashing, and renaming commits.
  • Selective Cherry-Picking & Bisect: apply precise changes across branches and locate bug-introducing commits efficiently.
  • Safe Worktrees & Recovery: manage multiple branches concurrently and recover from mistakes using reflog-native workflows.

Quick Start

Create a clean branch from main, then run the guided cleanup to rewrite recent history into a coherent set of commits.

Frequently Asked Questions about git-advanced-workflows

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

FAQPage Schema
How do I clean up a messy git commit history before merging a feature branch?

To clean up messy git commit history, use interactive rebase to squash, reorder, and rename commits into a concise, readable sequence. This rewrites recent history into meaningful commits for cleaner collaboration and code reviews.

What is the best way to apply specific commits from one branch to another?

The best way to apply specific commits across branches is cherry-picking. This allows you to selectively apply precise changes from one branch to another, ensuring only the desired commits are transferred without merging entire histories.

How do I find which commit introduced a bug using git bisect?

Git bisect helps locate bug-introducing commits efficiently by performing a binary search through your commit history. It systematically checks out commits to pinpoint the exact change that introduced the regression.

Can I work on multiple branches simultaneously without switching in git?

Yes, you can manage multiple branches concurrently using git worktree. This feature allows you to check out and work on different branches in separate directories simultaneously, eliminating the need to stash or switch branches constantly.

How do I recover lost commits after a failed rebase or history rewrite?

To recover lost commits after a failed rebase or history rewrite, use the git reflog. It tracks head movements and enables safe recovery checks, allowing you to restore your branch to its previous state.

When should I avoid rewriting git history on shared branches?

You should avoid rewriting git history on shared branches because it causes conflicts for collaborators. Safe recovery checks and reflog workflows help manage local branches, but rewriting published history disrupts team synchronization and version control integrity.