git-advanced-workflows

Guides Git rebasing, cherry-picking, bisect, worktrees, and reflog recovery workflows.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill git-advanced-workflows-sanketadlak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-advanced-workflows
Source: https://github.com/SanketAdlak/PDMProjectDesign/tree/main/.agents/skills/git-advanced-workflows
Command: npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill git-advanced-workflows-sanketadlak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Complex Git histories, lost commits, and multi-branch coordination often lead to messy pull requests, hard-to-trace bugs, and fear of irreversible mistakes. This Skill provides structured guidance for managing advanced Git operations safely. ## Core Features & Use Cases - History Editing: Interactive rebase, autosquash, and commit splitting to produce clean, reviewable pull requests. - Bug Hunting & Recovery: Git bisect for locating bug-introducing commits and reflog for recovering lost commits or deleted branches. - Parallel Development: Worktrees for working on multiple branches simultaneously and cherry-picking fixes across release branches. - Use Case: A developer needs to ship a security patch to three release branches while cleaning up a feature branch for review—use cherry-pick for the releases and interactive rebase with autosquash for the PR. ## Quick Start Ask the AI to help you clean up your feature branch history 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 commit history before a pull request?

Use interactive rebase with git rebase -i against the base branch to squash, reword, reorder, or drop commits. After rewriting history, push with git push --force-with-lease to avoid overwriting others' work.

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

Use git bisect to binary-search history: mark a bad commit and a known good commit, then test each checkout. You can automate it with git bisect run followed by a test script that exits 0 for good.

When should I use rebase vs merge in Git?

Rebase for cleaning up local commits and keeping feature branches current with main, producing linear history. Merge when integrating completed features or working on shared public branches where history must be preserved.

Can I recover a deleted branch or lost commit in Git?

Yes, git reflog tracks all ref movements for about 90 days. Find the lost commit hash in the reflog output, then run git branch recovered-branch <hash> or git reset --hard <hash> to restore it.

What are Git worktrees and when should I use them?

Git worktrees let you check out multiple branches in separate directories simultaneously, avoiding stashing or switching. Use them for urgent hotfixes while keeping your main working directory untouched, then remove them with git worktree remove.