git-push
GitHub用于安全地将已提交的代码推送到远程分支。检查工作区状态,拒绝向受保护分支推送,处理上游设置及推送被拒后的分歧,确保不使用强制推送。
Trigger Scenarios
Install
npx skills add Terry-Mao/AICodingFlow --skill git-push -g -y
SKILL.md
Frontmatter
{
"name": "git-push",
"description": "Publish committed work to the correct remote branch without unsafe force pushes."
}
git-push
Use this after commits exist and the user asks to push or publish the current branch.
Check worktree status, current branch, upstream, and commits not yet on the
upstream. Refuse main, master, develop, and release branches unless the
user explicitly asks. Dirty changes are not pushed; report them and continue
only when pushing existing commits is clearly intended.
Use ordinary push for an existing upstream, otherwise set the branch upstream:
git push
git push -u origin <branch>
If rejected, fetch and inspect divergence. Ask before rebasing, merging, or
using --force-with-lease; never use plain --force unless explicitly
requested. Report branch, remote/upstream, pushed commit, result, and any dirty
changes left behind.
Version History
-
d3fef11
Current 2026-09-03 03:51
精简了本地开发与 spec 工作流指引,优化了命令调用方式。
- e53c5ac 2026-07-24 11:35


