git-advanced-workflows

Perform interactive rebases, cherry-picks, bisects, and worktree operations in Git.

1|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/zmre/nix-pai --skill git-advanced-workflows-zmre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-advanced-workflows
Source: https://github.com/zmre/nix-pai/tree/main/claude/skills/developer-essentials/git-advanced-workflows
Command: npx skills add https://github.com/zmre/nix-pai --skill git-advanced-workflows-zmre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex collaborative development often requires advanced Git techniques beyond basic commit and push operations. This skill provides comprehensive guidance on advanced Git workflows, helping you manage complex version control scenarios, maintain a clean history, and resolve conflicts efficiently.

Core Features & Use Cases

  • History Rewriting: Techniques like rebasing and interactive rebase for cleaning up commit history.
  • Code Portability: Strategies for cherry-picking commits and managing submodules for flexible code sharing.
  • Conflict Resolution: Advanced methods for resolving complex merge conflicts, saving time and frustration.
  • Use Case: You've been working on a feature branch and need to integrate it cleanly into the main branch, but the main branch has diverged significantly. Use this skill to perform an interactive rebase, squashing commits and resolving conflicts to create a clean, linear history.

Quick Start

Use the git-advanced-workflows skill to explain how to use 'git rebase -i' to squash multiple commits into one.

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 multiple commits before merging a feature branch?

Interactive rebase lets you squash, reword, and reorder commits into a clean history. Run `git rebase -i` on your feature branch to pick, squash, or fixup commits before merging into main, eliminating intermediate work-in-progress commits.

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

Cherry-picking extracts individual commits and applies them to your current branch without merging the entire branch history. Use `git cherry-pick <commit-hash>` to port targeted changes across branches while maintaining a linear workflow.

How do I find which commit introduced a bug in my codebase?

Git bisect automates the process of locating a bug-introducing commit by binary search. Run `git bisect start`, mark known good and bad commits, then test incrementally narrowed ranges until the culprit commit is identified.

Can I safely force-push without overwriting teammates' work?

Force-with-lease (`git push --force-with-lease`) safely rewrites history by checking the remote hasn't changed since your last fetch, preventing accidental overwrites of collaborators' commits while allowing your local rewrites.

How do I recover from a mistake after resetting or rebasing commits?

Reflog maintains a history of all branch movements and commits you've checked out. Use `git reflog` to find lost commits and `git reset --hard <ref>` to restore them, even after destructive operations like rebase or reset.

When should I use rebasing instead of merging?

Rebase rewrites history into a linear sequence ideal for feature branches before integration, preserving readability. Use rebase on local branches before pushing; use merge for shared branches to preserve collaboration history and avoid conflicts for teammates.