git

Manage Git history with rebases, stashes, resets, and reflog recovery.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/dotBeeps/hoard --skill git-dotbeeps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git
Source: https://github.com/dotBeeps/hoard/tree/main/morsels/skills/git
Command: npx skills add https://github.com/dotBeeps/hoard --skill git-dotbeeps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides an opinionated, practical workflow to avoid messy commit history, reduce painful merge conflicts, and recover lost work in solo and small-team git projects. It captures conventions for branching, local cleanup, integration, and emergency recovery so developers can move faster with less risk.

Core Features & Use Cases

  • Branching strategy recommending short-lived feature branches from main and consistent branch naming to simplify reviews and rollbacks.
  • Local interactive rebase and autosquash patterns to tidy commits before push, plus guidance on when to squash-merge to main versus when to preserve merge commits.
  • History surgery techniques including bisect-driven bug hunting, cherry-pick patterns, reflog-based recovery, stash workflows, reset/clean modes, and conflict resolution strategies including rerere and merge strategy flags.
  • Use case: clean up a messy feature branch with fixup commits, rebase onto main, resolve conflicts safely, and squash-merge to produce a single, reviewable commit on main.

Quick Start

Use the git skill to get step-by-step guidance for rebasing a feature branch onto main, resolving conflicts, and preparing a clean squash-merge for the pull request.

Frequently Asked Questions about git

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

FAQPage Schema
How do I resolve git merge conflicts during an interactive rebase?

Resolve git merge conflicts by using interactive rebase with autosquash to tidy commits, applying conflict resolution strategies like rerere and merge strategy flags to safely integrate feature branches onto main.

What is the best way to recover lost commits after a hard reset?

Recover lost commits by navigating the git reflog to find the orphaned commit hash, then executing a hard reset to that reference to restore your branch state and salvage feature work.

How do I clean up a messy feature branch before squash-merging to main?

Clean up a messy feature branch by creating fixup commits, running an interactive rebase with autosquash to consolidate the history, then squash-merging to main for a single reviewable commit.

Can I use git bisect to hunt down a regression in my commit history?

Use git bisect to hunt regressions by marking known good and bad commits, allowing the system to binary search the history and automatically check out intermediate revisions to isolate the bug.

When should I avoid rebasing shared branches in a small team?

Avoid rebasing shared branches because rewriting public history causes divergent trees and painful conflicts; instead, preserve merge commits or use short-lived GitHub Flow branches to simplify rollbacks.

What is the proper workflow for stashing and restoring uncommitted changes?

Stash uncommitted changes to save your working directory state, switch branches to handle emergencies, then restore the stash using stash workflows to resume your feature development seamlessly.