orchestrate-rebase

Orchestrate Git interactive rebases programmatically via GIT_SEQUENCE_EDITOR.

Updated Mar 29, 2024
One-click install
npx skills add https://github.com/addisonbeck/nix --skill orchestrate-rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orchestrate-rebase
Source: https://github.com/addisonbeck/nix/tree/main/bobert/skills/orchestrate-rebase
Command: npx skills add https://github.com/addisonbeck/nix --skill orchestrate-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, jq.

What problem does it solve?

Git's interactive rebase mode typically requires stdin interaction to edit the todo list, messages, and state transitions. This skill programmatically controls rebase sequences via GIT_SEQUENCE_EDITOR, enabling automation of squash, reword, drop, fixup, edit, and reorder operations, including pausing for manual changes and providing clear conflict resolution paths.

Core Features & Use Cases

  • Programmatic control of git rebase using GIT_SEQUENCE_EDITOR
  • Support for actions: pick, squash, reword, drop, fixup, edit
  • Edit pauses for manual changes and conflicts with guided prompts
  • Handles conflicts gracefully with structured paused responses and clear continue/abort commands

Quick Start

Pipe a JSON payload describing base_commit and operations to the orchestrate-rebase script to run a non-interactive rebase.

Frequently Asked Questions about orchestrate-rebase

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

FAQPage Schema
How do I automate a git interactive rebase without stdin prompts?

A git interactive rebase can be automated without stdin prompts by using GIT_SEQUENCE_EDITOR to control the rebase todo list programmatically. Pipe a JSON payload specifying base_commit and operations to execute actions like squash, reword, drop, fixup, edit, and reorder. The process validates base commit, commit existence, action set, and input integrity before running.

What is the best way to squash or reword git commits in an automated workflow?

The best way to squash or reword git commits in an automated workflow is controlling the rebase todo list via GIT_SEQUENCE_EDITOR. This method supports pick, squash, reword, drop, fixup, and edit actions. Provide a JSON payload describing the base_commit and desired operations to run the rebase sequence programmatically without manual interaction.

How does GIT_SEQUENCE_EDITOR work for programmatic git rebase control?

GIT_SEQUENCE_EDITOR enables programmatic git rebase control by replacing the interactive text editor with an automated process. It modifies the rebase todo list directly to apply pick, squash, reword, drop, fixup, and edit actions. An edit and amend pattern manages state transitions and pauses for manual changes during the rebase sequence.

Can I pause a non-interactive git rebase for manual edits and conflict resolution?

Yes, you can pause a non-interactive git rebase for manual edits and conflict resolution. The orchestration supports edit pauses for manual changes and handles conflicts gracefully with structured paused responses. It provides clear continue and abort commands, outputting a structured status indicating success, paused, or error details.

Do I need jq and git installed to orchestrate non-interactive rebases?

Yes, you need both git and jq installed to orchestrate non-interactive rebases. Git provides the underlying version control and interactive rebase functionality, while jq processes the JSON payload describing base_commit and operations. These dependencies validate input integrity and execute the rebase sequence programmatically.

Why does my automated git rebase fail with invalid commit actions?

An automated git rebase fails with invalid commit actions if the input violates action set or input integrity validations. The orchestration validates the base commit, commit existence, and action set before execution. Allowed actions are pick, squash, reword, drop, fixup, and edit. The output provides structured error details for failed operations.