recommit

Reset to a base branch merge-base and re-commit changes in logical units.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/inakam/dotfiles-raspberry --skill recommit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recommit
Source: https://github.com/inakam/dotfiles-raspberry/tree/main/dot_claude/skills/recommit
Command: npx skills add https://github.com/inakam/dotfiles-raspberry --skill recommit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resetting a messy commit history by basing changes on a clean base branch, then re-creating commits in logical, review-friendly units.

Core Features & Use Cases

  • Soft reset to the base-branch merge-base, preserving changes in the index for re-commit.
  • Plan and execute commits in logical units to improve code review and history clarity.
  • Interactive staging with optional git add -p to craft precise commits.
  • Auto-detects base branches (main/master) or uses user-specified base for flexible workflows.

Quick Start

Ask the skill to recommit your current work by specifying a base branch or letting it auto-detect main/master, then follow prompts to craft structured commits.

Frequently Asked Questions about recommit

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

FAQPage Schema
How do I split a messy git commit history into clean, review-friendly commits?

You can recommit messy git changes by soft resetting to the merge-base of a base branch, then re-staging and re-committing diffs in logical units. This preserves all changes while letting you craft individual, review-friendly commits.

How does a git soft reset to merge-base work for reorganizing commits?

A git soft reset to the merge-base moves your branch pointer back while keeping all file changes staged in the index. Recommit uses this mechanism to preserve your work intact, allowing you to selectively re-commit the diff in structured, logical units.

Can I auto-detect main or master as the base branch when reorganizing commits?

Yes, recommit auto-detects main or master as the base branch for flexible workflows. Alternatively, you can explicitly specify a custom base branch to reset against, ensuring the merge-base calculation aligns with your repository's specific branching strategy.

What is the best way to prepare a large feature branch diff for code review?

The best way to prepare a large diff for code review is to recommit the changes into smaller, logical units. By soft resetting the branch to its base and using interactive staging, you create focused commits that make review feedback easier to manage and track.

Is interactive staging with git add -p supported when splitting commits?

Yes, interactive staging with git add -p is supported to craft precise commits. Recommit prompts you to selectively stage specific hunks of your diff, ensuring each reorganized commit contains only the relevant code changes for clearer history.

What happens if I accidentally lose changes during a git reset and recommit?

To prevent accidental data loss during a git reset and recommit, the skill implements safety prompts before executing per-commit actions. Because the soft reset preserves changes in the index, your work remains staged and recoverable throughout the reorganization process.