帮助你同步当前分支与上游分支,完成拉取、变基、推送或发布操作
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "sync" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/src/vs/sessions/skills/sync/SKILL.md 2. 保存为 ~/.claude/skills/sync/SKILL.md 3. 装好后重载技能,告诉我可以用了
请把我当前分支与上游分支同步,先拉取最新改动并按需变基,确保分支是最新状态。
完成当前分支与上游分支的同步,并反馈是否拉取、变基成功或存在冲突。
请将我当前分支推送到远程仓库,如果已经配置上游分支就直接同步推送。
当前分支被成功推送到远程,并说明推送目标分支与执行结果。
请把我当前本地分支发布到远程,并为它设置上游分支,方便后续直接 pull 和 push。
当前本地分支已发布到远程并完成上游关联设置,可直接继续同步操作。
Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.
--force, --force-with-lease) without explicit user approval.--no-verify)./commit skill to commit them before continuing.git fetch <upstream-remote>
3.2. Check ahead/behind counts. If the branch is already in sync (0 ahead, 0 behind), stop and report that no sync is needed.
git rev-list --left-right --count HEAD...@{u}
3.3. If behind, rebase onto the upstream tracking branch.
git rebase @{u}
3.4. If there are merge conflicts, resolve them by preserving the intent of both sides. Stage the resolved files and continue the rebase.
git add <resolved-files>
git rebase --continue
If conflict resolution is unclear, ask the user how to proceed. If the user wants to stop the rebase, abort it:
git rebase --abort
3.5. If the branch has local commits (ahead > 0), push them to the remote after a successful rebase.
git push
If the push is rejected because the rebase rewrote history, explain the situation to the user and ask for approval before force-pushing.git push -u <remote> HEAD
After the workflow completes, validate the result with explicit checks:
git status --porcelain
git rev-list --left-right --count HEAD...@{u}
git rev-parse --abbrev-ref --symbolic-full-name @{u}
帮助开发者定位并读取 Code OSS 开发构建日志,快速排查运行与扩展问题。
帮助开发者新增、修改或审查 VS Code 配置策略,并生成平台相关产物。
帮助开发者验证 Azure DevOps 流水线改动,快速排查构建与 YAML 配置问题。
在隔离环境启动 VS Code OSS,便于联动自动化操作与多进程调试。
运行聊天性能基准与内存泄漏检查,定位聊天界面回归和性能问题。
帮助开发者创建和维护组件截图测试夹具,并优化组件的可测试性。
将落后的会话分支变基到最新上游,并在冲突中保留上游改动。
将当前会话分支的修改合并回基础分支,便于整合开发成果。
帮助你创建、切换并检查代码分支,确保实现前遵循正确分支策略。
根据当前会话中的代码改动,快速创建可提交的拉取请求。
为当前会话中的代码改动快速创建草稿拉取请求,便于协作评审。
帮助用户把当前会话中的新代码变更更新到已有拉取请求中