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


