Skip to main content

samba-pr-rebase

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

跳到安装

来源信息

仓库
criptogus/Samba-Builder
最近来源活动
2026年9月8日 15:30
检测到的 SKILL.md 语言
英语
星标
1
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
samba: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 `/samba: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
在 GitHub 查看