Git commits, branches, rebases, merges, conflict resolution, history recovery, team workflows, and the commands needed for safe day-to-day version control. U...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install git或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install git⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/git/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: Git slug: git version: 1.0.8 description: "Git commits, branches, rebases, merges, conflict resolution, history recovery, team workflows, and the commands needed for safe day-to-day version control. Use when (1) the task touches Git, a repository, commits, branches, merges, rebases, or pull requests; (2) history safety, collaboration, or recovery matter; (3) the agent should automatically apply Git discipline instead of improvising." homepage: https://clawic.com/skills/git changelog: Simplified the skill name and kept the stateless activation guidance metadata: {"clawdbot":{"emoji":"📚","requires":{"bins":["git"]},"os":["linux","darwin","win32"]}} ---
Use when the task involves Git repositories, branches, commits, merges, rebases, pull requests, conflict resolution, history inspection, or recovery. This skill is stateless and should be applied by default whenever Git work is part of the job.
| Topic | File | |-------|------| | Essential commands | commands.md | | Advanced operations | advanced.md | | Branch strategies | branching.md | | Conflict resolution | conflicts.md | | History and recovery | history.md | | Team workflows | collaboration.md |
--force-with-lease on feature branches onlygit pull --rebase before pushing to avoid merge commitsgit rebase -i to squash fixup commitsFeature Branch Flow:
git checkout -b feature/name from mainHotfix Flow:
git checkout -b hotfix/issue from mainDaily Sync:
git fetch --all --prune
git rebase origin/main # or merge if team prefers
type(scope): descriptionfeat, fix, docs, style, refactor, test, choregit push --force-with-lease instead of --force — prevents overwriting others' workgit pull --rebase before retryinggrep -r "<<<\|>>>\|===" .git merge --abort and try git rebase insteadgit branch -d branch-namegit fetch --prunegit rebase -i to squash messy commits before pushingBefore destructive operations (reset --hard, rebase, force push):
git branch to verifygit fetch firstgit config user.email before important commits.gitkeep--recurse-submodulesgit switch - to return to previous branchgit pull --rebase firststash apply insteadgit reset --soft HEAD~1git restore filenamegit reflog (keeps ~90 days of history)git checkout -b branch-name git add -p for partial staging when commit mixes multiple changesFind the commit that introduced a bug:
git bisect start
git bisect bad # current commit is broken
git bisect good v1.0.0 # this version worked
# Git checks out middle commit, test it, then:
git bisect good # or git bisect bad
# Repeat until Git finds the culprit
git bisect reset # return to original branch
git status -sb # short status with branch
git log --oneline -5 # last 5 commits
git shortlog -sn # contributors by commit count
git diff --stat HEAD~5 # changes summary last 5 commits
git branch -vv # branches with tracking info
git stash list # pending stashes
Install with clawhub install if user confirms:
gitlab — GitLab CI/CD and merge requestsdocker — Containerization workflowscode — Code quality and best practicesclawhub star gitclawhub sync安装 Git 后,可以对 AI 说这些话来触发它
Help me get started with Git
Explains what Git does, walks through the setup, and runs a quick demo based on your current project
Use Git to git commits, branches, rebases, merges, conflict resolution, histor...
Invokes Git with the right parameters and returns the result directly in the conversation
What can I do with Git in my design & creative workflow?
Lists the top use cases for Git, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/git/ 目录(个人级,所有项目可用),或 .claude/skills/git/(项目级)。重启 AI 客户端后,用 /git 主动调用,或让 AI 根据上下文自动发现并使用。
Git 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Git 可免费安装使用。请查阅仓库了解许可证信息。
Git commits, branches, rebases, merges, conflict resolution, history recovery, team workflows, and the commands needed for safe day-to-day version control. U...
Git 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using Git
Identifies repetitive steps in your workflow and sets up Git to handle them automatically