Skip to content
Back to skills

Pr Rebase

ASecurity

Rebase the current branch on the latest upstream changes, resolve conflicts, and push.

  • 21,660 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 3, 2026
ai-agentsgit

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add dyad-sh/dyad --skill pr-rebase --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr Rebase?

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

Security grade badge for Pr Rebase
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dyad-sh-pr-rebase/badge)](https://www.skillsdirectory.com/skills/dyad-sh-pr-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: dyad:pr-rebase
description: Rebase the current branch on the latest upstream changes, resolve conflicts, and push.
---

# PR Rebase

Rebase the current branch on the latest upstream changes, resolve conflicts, and push.

## Instructions

1. **Determine the git remote setup:**

   ```
   git remote -v
   git branch -vv
   ```

   In GitHub Actions for cross-repo PRs:
   - `origin` points to the **head repo** (fork) - this is where you push
   - `upstream` points to the **base repo** - this is what you rebase onto

   For same-repo PRs, `origin` points to the main repo and there may be no `upstream`.

2. **Fetch the latest changes:**

   ```
   git fetch --all
   ```

3. **Rebase onto the base branch:**

   Use `upstream/main` if the `upstream` remote exists (cross-repo PR), otherwise use `origin/main`:

   ```
   # Check if upstream remote exists
   git remote get-url upstream 2>/dev/null && git rebase upstream/main || git rebase origin/main
   ```

4. **If there are merge conflicts:**
   - Identify the conflicting files from the rebase output
   - Read each conflicting file and understand both versions of the changes
   - Resolve the conflicts by editing the files to combine changes appropriately
   - Stage the resolved files:

     ```
     git add <resolved-file>
     ```

   - Continue the rebase:

     ```
     git rebase --continue
     ```

   - Repeat until all conflicts are resolved and the rebase completes

5. **Run lint and push:**

   Run the `/dyad:pr-push` skill to run lint checks, fix any issues, and push the rebased branch.

6. **Summarize the results:**
   - Report that the rebase was successful
   - List any conflicts that were resolved
   - Note any lint fixes that were applied
   - Confirm the branch has been pushed

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.