返回顶部
c

commit-push提交推送

commit and push all local changes to remote repo

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.4
安全检测
已通过
108
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

commit-push

提交与推送

遵循约定式提交格式提交所有本地更改并推送到远程仓库。

第1步:收集上下文

并行运行以下命令以了解更改:

bash

查看所有未跟踪和已修改的文件


git status

查看已暂存和未暂存的更改

git diff git diff --cached

查看最近的提交信息以参考风格

git log --oneline -10

第2步:分析更改

审查更改并确定:

  • - 类型:这是什么类型的更改?

- feat - 新功能或能力
- fix - 错误修复
- docs - 仅文档
- refactor - 代码重构,不改变行为
- test - 添加或更新测试
- chore - 维护、依赖更新
- perf - 性能改进
- ci - CI/CD更改

  • - 范围:影响哪个组件?
- 检查更改的文件并确定适当的范围 - 在项目中使用一致的范围名称(查看 git log 了解模式) - (跨领域更改可省略范围)
  • - 破坏性:是否破坏向后兼容性?如果是,在范围后添加 !

第3步:编写提交信息

格式:

type(scope): description

[可选正文,解释原因而非内容]

[可选页脚,引用问题编号]

规则:

  • - 使用祈使语气:add feature 而非 added feature
  • 第一行保持在72个字符以内
  • 正文关注原因,差异显示内容
  • 引用问题:Closes #123 或 Fixes #456

第4步:暂存、提交和推送

bash

暂存所有更改(或选择性暂存)


git add -A

提交信息(使用HEREDOC支持多行)

git commit -m $(cat <可选正文,解释动机。

Closes #123

使用 Claude Code 生成

Co-Authored-By: Claude
EOF
)

推送到远程

git push

示例

bash

简单功能


git commit -m feat(api): add pagination support to list endpoints

带正文的错误修复

git commit -m $(cat <之前的实现没有考虑在长时间运行的请求处理过程中
令牌过期的情况。

Fixes #42

使用 Claude Code 生成

Co-Authored-By: Claude
EOF
)

破坏性更改

git commit -m $(cat <BREAKING CHANGE: status 字段现在是一个包含 state 和
message 属性的对象,而非纯字符串。

使用 Claude Code 生成

Co-Authored-By: Claude
EOF
)

第5步:验证

推送后,运行 git status 确认工作区干净且分支与远程仓库保持同步。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 commit-push-1775928622 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 commit-push-1775928622 技能

通过命令行安装

skillhub install commit-push-1775928622

下载

⬇ 下载 commit-push v1.1.4(免费)

文件大小: 1.93 KB | 发布时间: 2026-4-12 09:32

v1.1.4 最新 2026-4-12 09:32
- Improved SKILL.md documentation with step-by-step guidance for committing and pushing using Conventional Commits.
- Added specific instructions for analyzing changes, writing commit messages, and referencing issues.
- Included commit message templates and real-world examples for features, bug fixes, and breaking changes.
- Clarified steps for staging, committing, and pushing changes to a remote repository.
- Provided tips for maintaining consistent commit conventions and project scopes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部