push
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Push — 快速 Git 推送
将本地提交推送到远程仓库。
当前仓库状态
!`git status`
待推送提交
!`git log @{u}..HEAD --oneline 2>/dev/null || git log --oneline -5`
Steps
- 根据上方
git status判断:- 若有未提交的改动 → 提示用户有未提交改动(仅提醒,继续执行)
- 根据上方「待推送提交」判断:
- 若无待推送提交 → 提示用户没有需要推送的提交,立即结束
- 确定推送目标:
- 若提供了
$ARGUMENTS→ 使用git push $ARGUMENTS - 否则 → 使用
git push
- 若提供了
- 必须调用 Bash 工具执行推送命令(禁止模拟输出)
- 展示推送结果给用户
输出
直接展示 Bash 真实输出,不得手动拼接或模拟。