git-advanced-workflows

Automate interactive rebase, cherry-picking, bisect, worktrees, and reflog recovery for clean Git history.

Updated Nov 16, 2022
One-click install
npx skills add https://github.com/kos3nz/dotfiles --skill git-advanced-workflows-kos3nz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-advanced-workflows
Source: https://github.com/kos3nz/dotfiles/tree/main/.config/agents/skills/git-advanced-workflows
Command: npx skills add https://github.com/kos3nz/dotfiles --skill git-advanced-workflows-kos3nz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Advanced Git operations can clutter history or cause mishaps without a clear guide. This Skill provides structured techniques and concrete steps to maintain a clean project history, recover from mistakes, and coordinate multi-branch work.

Core Features & Use Cases

  • Interactive rebase to clean up commits before merging.
  • Precise cherry-picking, bisect, and worktrees to manage multiple features and fixes.
  • Reflog-based recovery to rollback or restore lost commits in complex scenarios.
  • Use cases include preparing clean PRs, emergency hotfix propagation across branches, and debugging elusive regressions.

Quick Start

Formulate a plan and run a guided sequence to clean a feature branch by rebasing onto main and selecting commits to keep.

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?

Use interactive rebase to clean up commits before merging. This workflow squashes, reorders, or edits commit messages to prepare a clean PR history for feature integration.

How does git reflog work to recover lost commits?

Git reflog tracks reference updates, enabling reflog-based recovery to rollback or restore lost commits when operations like rebasing or resetting cause unexpected mishaps in your branch.

What is the best way to debug a regression introduced in a multi-branch workflow?

The best way to debug an elusive regression is using git bisect. This binary search technique pinpoints the exact commit that introduced the bug across your multi-branch development history.

Can I work on multiple features simultaneously without cloning multiple repositories?

Yes, use git worktrees to manage multiple features simultaneously. Worktrees link multiple working directories to a single repository, allowing concurrent branch development without extra cloning.

How do I apply an emergency hotfix to multiple branches?

Propagate an emergency hotfix across branches using git cherry-pick. This applies specific bug fix commits from one branch to another, ensuring precise feature integration without merging entire histories.