git-workflows

Manage complex Git workflows with rebase, bisect, and worktrees.

Updated Sep 8, 2025
One-click install
npx skills add https://github.com/randalmurphal/claude-config --skill git-workflows-randalmurphal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflows
Source: https://github.com/randalmurphal/claude-config/tree/main/skills/git-workflows
Command: npx skills add https://github.com/randalmurphal/claude-config --skill git-workflows-randalmurphal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Advanced Git workflows including interactive rebase, bisect, worktrees, branch strategies, conflict resolution, cherry-picking, and submodules. Use when doing complex git operations, cleaning up commit history, managing multiple branches, investigating bugs with git bisect, or working on parallel features with worktrees.

Core Features & Use Cases

  • Worktrees for Parallel Development: Reduce context switching with multiple worktrees.
  • Interactive Rebase & History Cleanup: Create clean, review-friendly commits.
  • Bisect for Bug Hunting: Efficiently locate buggy commits.
  • Branch Strategies & Submodules: Manage complex repos with discipline.

Quick Start

Use git worktree commands to create parallel worktrees, e.g., git worktree add <path> <branch>, and use git bisect for bug hunting.

Frequently Asked Questions about git-workflows

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

FAQPage Schema
How do I clean up my Git commit history with interactive rebase?

Interactive rebase lets you reorder, squash, and edit commits before pushing. Run `git rebase -i HEAD~N` (where N is the number of commits) to open an editor, then mark commits as pick, squash, reword, or drop. This creates a clean, review-friendly history without altering published branches.

When should I use Git worktrees instead of switching branches?

Worktrees let you work on multiple branches simultaneously without switching your working directory. Use `git worktree add <path> <branch>` to create a parallel checkout. This eliminates context-switching overhead and is ideal when juggling features, hotfixes, or concurrent investigations.

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

Git bisect performs binary search across your commit history to isolate the buggy commit. Run `git bisect start`, mark the current commit as bad and a known-good commit as good, then test each suggested commit. Bisect narrows the search space exponentially, typically finding the culprit in minutes.

What's the best way to resolve merge conflicts across multiple branches?

Resolve conflicts by editing files to keep or discard changes, then stage and commit. For complex merges, use `git merge --no-commit` to review before committing, or cherry-pick individual commits selectively. Branch strategies and clear commit hygiene prevent most conflicts upfront.

Can I safely rebase commits that have already been pushed?

Rebasing published commits rewrites history and breaks other users' branches. Only rebase unpublished work or use `git push --force-with-lease` on branches you own exclusively. For shared branches, prefer merging or cherry-picking to preserve published history and maintain auditability.

How do I manage dependencies between repositories using Git submodules?

Submodules embed one repository inside another at a fixed commit. Use `git submodule add <repo-url> <path>` to add, then `git submodule update --recursive` to sync. This enforces discipline across complex repos but requires coordinated updates and careful conflict resolution.