Skip to content

claude-commands/command-rebase-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

command-rebase-all

A Claude Code slash command for rebasing multiple branches onto a target branch.

Installation

# Clone to your preferred location
git clone git@github.com:claude-commands/command-rebase-all.git <clone-path>/command-rebase-all

# Symlink (use full path to cloned repo)
ln -s <clone-path>/command-rebase-all/rebase-all.md ~/.claude/commands/rebase-all.md

Usage

/rebase-all                    # Rebase all local branches onto main/master
/rebase-all develop            # Rebase onto develop branch
/rebase-all --dry-run          # Show what would be rebased
/rebase-all main feature-*     # Rebase only feature branches

What it does

  1. Identifies target branch (main/master/develop)
  2. Lists all local branches and their status
  3. Checks for uncommitted changes
  4. Rebases each branch onto target
  5. Handles conflicts or reports failures
  6. Generates summary report

Output Format

Rebase Complete

Successfully Rebased (4):
| Branch       | Commits | Conflicts | Status  |
| ------------ | ------- | --------- | ------- |
| feature-auth | 3       | 0         | Rebased |
| feature-api  | 5       | 1         | Rebased |

Failed (1):
| Branch     | Reason                     |
| ---------- | -------------------------- |
| feature-db | Unresolved conflicts       |

Options

Option Description
--dry-run Preview without executing
--force Continue past conflicts
--backup Create backup refs before rebasing
--exclude Skip branches matching pattern

Safety Features

  • Dry run mode for previewing changes
  • Stash check for uncommitted changes
  • Force-with-lease for safe pushes
  • Automatic conflict detection

Requirements

  • Git
  • Claude Code with Opus 4.5 model access

Updates

cd <clone-path>/command-rebase-all && git pull

About

Rebase multiple branches onto a target branch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published