360 Secure SkillHub
360 安全技能中心

Git Ops

该 Skill 是一份 Git 日常操作速查指南,强调先查看状态再操作、未保存改动先提交或暂存、拉取前保持工作区干净、不强制回退已推送提交等安全原则;列出状态查看、暂存提交、分支、同步、stash、撤销与标签等常用命令,并给出分支命名与 Conventional Commits 等实践建议。

分类:开发
cooperiano
cooperiano
热度 14.37
最近更新 2026-07-10 11:44:23

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add cooperiano/git-ops
兼容性
通用兼容
联网要求
需要联网
数据出网
可选出网
Metadata
name
git-ops
description
Git日常操作:status/pull/push/branch/log/commit/merge,基础工作流,命令行安全操作指导
user-invocable
true
metadata
{"openclaw":{"emoji":"📦","tags":["git","version-control"]}}

Git Ops v2.0

安全原则

  1. git status 先检查再操作
  2. 未保存改动先 stash/commit
  3. pull前确保干净
  4. 不强制回退已推送提交

速查

状态

git status / git log --oneline -20 / git diff / git branch -a

暂存提交

git add <file> / git add -A / git commit -m "msg" / git commit --amend

分支

git branch <name> / git checkout -b <name> / git merge <branch> / git branch -d

同步

git pull --rebase / git push / git push -u origin <branch> / git fetch

暂存

git stash / git stash pop / git stash list

撤销

git reset <file> / git checkout -- <file> / git revert <commit>

标签

git tag v1.0.0 / git tag -a v1.0.0 -m "msg" / git push origin v1.0.0

最佳实践

分支: feature/fix/chore | Commit: Conventional Commits | 经常pull | 一个大功能=一个分支+多个小commit