git-advanced-workflows

Guides interactive rebasing, cherry-picking, bisect, worktrees, and reflog recovery in Git repositories.

Updated May 20, 2026
One-click install
npx skills add https://github.com/TechCorp25/kingdom --skill git-advanced-workflows-techcorp25
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-advanced-workflows
Source: https://github.com/TechCorp25/kingdom/tree/main/.claude/skills/developer-essentials/skills/git-advanced-workflows
Command: npx skills add https://github.com/TechCorp25/kingdom --skill git-advanced-workflows-techcorp25

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Complex Git operations like rewriting history, finding bug-introducing commits, and recovering lost work are error-prone and risky without clear guidance, often leading to lost commits or broken shared branches. ## Core Features & Use Cases - History Editing: Interactive rebase with squash, fixup, reword, and autosquash to clean up feature branches before pull requests. - Bug Hunting & Recovery: Git bisect for binary-searching bug-introducing commits and reflog for recovering deleted branches or lost commits. - Parallel Development: Worktrees for working on multiple branches simultaneously and cherry-picking for applying fixes across release branches. - Use Case: You need to ship a security patch to three release branches. Create the fix once on main, then cherry-pick it onto each release branch, resolving conflicts with the documented continue/abort workflow. ## Quick Start Ask the assistant to clean up the last five commits on your feature branch with an interactive rebase before opening a pull request.

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 commits before a pull request with git rebase?▼

Run git rebase -i with the merge base of your branch, then use squash, fixup, reword, or drop on each commit. Afterward, push with git push --force-with-lease to safely update the remote branch.

How do I find which commit introduced a bug in Git?▼

Use git bisect: mark the current commit as bad and a known release as good, then test each checkout Git presents. You can automate it with git bisect run followed by a test script that exits 0 for good commits.

When should I use git rebase vs git merge?▼

Rebase for cleaning up local commits and keeping a feature branch current with main to produce linear history. Merge when integrating completed features or working on public branches shared with others, since rebasing shared commits causes conflicts.

How do I recover a deleted branch or lost commit in Git?▼

Run git reflog to find the commit hash from before the deletion, then recreate the branch with git branch recovered-branch <hash>. Reflog retains ref movements for about 90 days, making it a reliable safety net.

What are the risks of force pushing after a rebase?▼

Plain git push --force can overwrite teammates' work on shared branches. Always use --force-with-lease, which fails if the remote has moved unexpectedly, and never rebase commits already pushed and used by others.