跳到正文
Skillpedia
部署与云(DevOps)33k · #8762

git-pushing

它能做什么

这个技能让你的 AI 智能体一步把工作保存到远程 Git 分支。适合希望无需逐条输入 Git 命令即可提交并推送的开发者。

适用场景

  • ✓当你要求提交并推送改动,或将其推送到 GitHub 时。
  • ✓当你完成一个功能,想要在远程分享它时。
  • ✓当你说“保存我的工作”或“把这个推上去”之类的话时。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/git-pushing/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/git-pushing/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请提交我的改动,并推送到 GitHub。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体运行一个提供的脚本,它会暂存所有改动、撰写约定式提交信息,并以上游跟踪的方式推送。你也可以给脚本提供你自己的提交信息。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Git Push Workflow

Stage all changes, create a conventional commit, and push to the remote branch.

When to Use

Automatically activate when the user:

  • Explicitly asks to push changes ("push this", "commit and push")
  • Mentions saving work to remote ("save to github", "push to remote")
  • Completes a feature and wants to share it
  • Says phrases like "let's push this up" or "commit these changes"

Workflow

ALWAYS use the script - do NOT use manual git commands:

bash skills/git-pushing/scripts/smart_commit.sh

With custom message:

bash skills/git-pushing/scripts/smart_commit.sh "feat: add feature"

Script handles: staging, conventional commit message, Claude footer, push with -u flag.

常见问题

它会暂存每个文件吗?

会。脚本会在提交前暂存所有改动。

我可以写自己的提交信息吗?

可以。你可以把自定义信息传给脚本。

为什么用脚本而不是手动 Git 命令?

该技能要求每次都使用脚本,使提交和推送步骤保持一致。

详情

作者的原始描述

Stage, commit, and push git changes with conventional commit messages. Use when user wants to commit and push changes, mentions pushing to remote, or asks to save and push their work. Also activates when user says "push changes", "commit and push", "push this", "push to github", or similar git workflow requests.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8762
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能