Skip to content
Back to skills

Rebase

ASecurity

Rebase the current branch with smart conflict resolution.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
toolsgobashgit

Security analysis

A100/100

Scanned August 31, 2026

npx -y skills add okm321/dotfiles --skill rebase --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rebase?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rebase
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/okm321-rebase/badge)](https://www.skillsdirectory.com/skills/okm321-rebase)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rebase
description: Rebase the current branch with smart conflict resolution.
disable-model-invocation: true
allowed-tools: Read, Bash, Glob, Grep
---

<!-- Customize conflict resolution strategy to match your preferences. -->

Rebase the current branch.

Arguments: $ARGUMENTS

Behavior:

- No arguments: rebase on local main
- "origin": fetch origin, rebase on origin/main
- "origin/branch": fetch origin, rebase on origin/branch
- "branch": rebase on local branch

Steps:

1. Parse arguments:
   - No args → target is "main", no fetch
   - Contains "/" (e.g., "origin/develop") → split into remote and branch, fetch
     remote, target is remote/branch
   - Just "origin" → fetch origin, target is "origin/main"
   - Anything else → target is that branch name, no fetch
2. If fetching, run: `git fetch <remote>`
3. Run: `git rebase <target>`
4. If conflicts occur, handle them carefully (see below)
5. Continue until rebase is complete

Handling conflicts:

- BEFORE resolving any conflict, understand what changes were made to each
  conflicting file in the target branch
- For each conflicting file, run `git log -p -n 3 <target> -- <file>` to see
  recent changes to that file in the target branch
- The goal is to preserve BOTH the changes from the target branch AND our
  branch's changes
- After resolving each conflict, stage the file and continue with
  `git rebase --continue`
- If a conflict is too complex or unclear, ask for guidance before proceeding

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.