git-advanced-workflows

Manage Git history with rebase, cherry-pick, bisect, worktrees, and reflog.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/yusoofsh/dotfiles --skill git-advanced-workflows
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-advanced-workflows
Source: https://github.com/yusoofsh/dotfiles/tree/main/home/dot_claude/private_plugins/private_marketplaces/claude-code-workflows/plugins/developer-essentials/skills/git-advanced-workflows
Command: npx skills add https://github.com/yusoofsh/dotfiles --skill git-advanced-workflows

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill equips you with advanced Git techniques to maintain a clean, linear commit history, collaborate effectively on complex features, and confidently recover from any Git mistake or lost work.

Core Features & Use Cases

  • Interactive Rebase: Edit, squash, reword, and reorder commits to craft a pristine history before merging.
  • Cherry-Picking: Apply specific commits across branches without full merges, ideal for hotfixes.
  • Git Bisect: Perform a binary search through history to quickly pinpoint the exact commit that introduced a bug.
  • Worktrees & Reflog: Work on multiple branches simultaneously and recover lost commits or branches with your Git safety net.
  • Use Case: Clean up a messy feature branch with dozens of "fix typo" commits into a concise, logical history before submitting a pull request, making it easier for reviewers.

Quick Start

Use the git-advanced-workflows skill to generate the Git command for an interactive rebase of the last 5 commits on the current branch.

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 my commit history before merging a pull request?

Interactive rebase lets you edit, squash, and reorder commits into a clean, logical history. Use `git rebase -i HEAD~N` to interactively modify your last N commits, then force-push with `git push --force-with-lease` to update your PR safely.

How do I find which commit introduced a bug?

Git bisect performs a binary search through your history to pinpoint the exact commit that broke functionality. Run `git bisect start`, mark a known-good commit and known-bad commit, then bisect automatically narrows down the culprit in logarithmic time.

Can I apply a specific commit from one branch to another without a full merge?

Cherry-pick extracts and applies individual commits across branches, ideal for hotfixes or selective backports. Use `git cherry-pick <commit-hash>` to replay that commit on your current branch, handling conflicts as they arise.

How do I recover a deleted branch or lost commits?

Reflog tracks all HEAD movements and deleted references, acting as a safety net for lost work. Use `git reflog` to find the commit hash, then `git checkout -b <branch-name> <hash>` or `git reset --hard <hash>` to recover.

What's the safest way to force-push changes without overwriting a collaborator's work?

Force-with-lease (`git push --force-with-lease`) only overwrites if the remote branch hasn't changed since your last fetch, preventing accidental data loss in shared branches compared to a raw force-push.

Can I work on multiple branches simultaneously without switching contexts?

Git worktrees create independent working directories for different branches, letting you develop in parallel without stashing or switching. Use `git worktree add <path> <branch>` to set up a separate checkout.