non-interactive-git-rebase

Script Git interactive rebases using GIT_SEQUENCE_EDITOR and --exec.

11.2k|839|Updated Oct 22, 2018
One-click install
npx skills add https://github.com/facebook/hermes --skill non-interactive-git-rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: non-interactive-git-rebase
Source: https://github.com/facebook/hermes/tree/main/.claude/skills/non-interactive-git-rebase
Command: npx skills add https://github.com/facebook/hermes --skill non-interactive-git-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables programmatic control over Git interactive rebase operations, allowing for complex commit manipulations without manual editor intervention.

Core Features & Use Cases

  • Automated Commit Reordering: Script the rearrangement of commits in your history.
  • Non-Interactive Squashing/Dropping: Combine or remove commits automatically based on predefined logic.
  • Bulk Commit Amendments: Modify author information, commit messages, or dates across multiple commits programmatically.
  • Commit Splitting: Divide a single commit into multiple smaller commits.
  • Use Case: Automate the cleanup of a feature branch before merging by reordering, squashing, and amending commits based on a predefined script.

Quick Start

Use the non-interactive-git-rebase skill to reorder commits by moving commit abc123 to the front of the rebase sequence starting from <base>.

Frequently Asked Questions about non-interactive-git-rebase

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

FAQPage Schema
How do I automate a Git interactive rebase without opening the editor?

To automate Git interactive rebase without an editor, script the commit sequence operations using `GIT_SEQUENCE_EDITOR` and the `--exec` flag. This allows you to programmatically reorder, squash, or drop commits without manual intervention.

Can I bulk amend commit messages and author info across multiple historical commits?

Yes, you can bulk amend commit messages, author information, and dates across multiple historical commits programmatically by scripting the rebase sequence operations using `GIT_SEQUENCE_EDITOR`.

What is the best way to script Git commit reordering for a feature branch cleanup?

The best way to script Git commit reordering for feature branch cleanup is using non-interactive Git rebasing. It automates rearranging, squashing, and dropping commits based on a predefined script logic.

Does non-interactive Git rebasing support splitting historical commits programmatically?

Yes, non-interactive Git rebasing supports splitting a single historical commit into multiple smaller commits programmatically. This is handled by scripting the interactive rebase operations without manual editor interaction.

What are the requirements for running scripted Git rebase operations?

Running scripted Git rebase operations requires Git version 2.x or higher and shell access for command execution. These prerequisites enable the use of `GIT_SEQUENCE_EDITOR` and `--exec` for non-interactive rebasing.