开发与测试
git-rebase
Rebase local commits on the configured upstream using the plugin rebase script.
motlin · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add motlin/claude-code-plugins --skill git-rebase技能说明
name: git-rebase description: Rebase local commits on the configured upstream using the plugin rebase script.
Git Rebase
Resolve <plugin-root> before running plugin scripts:
- In Claude Code, use
${CLAUDE_PLUGIN_ROOT}. - In Codex, use the plugin root that contains this
skills/git-rebase/SKILL.mdfile.
Run git status. If there are uncommitted changes, stop and report them.
Then run exactly this, with no added arguments or environment overrides:
<plugin-root>/scripts/rebase
The script reads the project's configured upstream remote and branch (usually origin/main). Other rebase commands pick the wrong base: git rebase and git replay don't know the upstream, and git pull --rebase and git rebase @{upstream} use the branch's tracking info, such as origin/<current-branch>.
Outcomes
- Success: report success.
- Merge conflicts: use the
git:conflictsskill. - Other errors: report the specific error and stop.