git-workflow
Skill1 starsChanged 3 months agoMITView on GitHub
Git 工作流规范。整理提交历史、规范分支命名、拆分过大的 commit、处理冲突,产出干净可回滚的提交记录。Use to keep git history clean: atomic commits, proper branch naming, rebase, and conflict resolution.
- Deletes or force-pushes
188 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- juninmd/skillstheir own version, first seen Nov 8, 2026
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- haythamasalama/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use squad-commands, ci-cd-pipelines and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillsquad-commands
Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.
Also in 5 projects that use this
harrissohail6Skillci-cd-pipelines
CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.
Also in 6 projects that use this
Microsoft AzureSkillarchitectural-proposals
How to write comprehensive architectural proposals that drive alignment before code is written
Also in 4 projects that use this
GitHubSkille2e-template-testing
End-to-end validation of coordinator and agent template changes
Also in 3 projects that use this
GitHubSkillnotification-routing
Route agent notifications to specific channels by type — prevent alert fatigue from single-channel flooding
Also in 3 projects that use this
frostneySkillnative-nostalgia-stack
Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.
Also in 3 projects that use this
- +5 more from Azure
- +1 more from github
Other versions188 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 188
- langfuse/langfuse★ 37ksame name
- modelcontextprotocol/typescript-sdk★ 14ksame name
- JetBrains/ideavim★ 10ksame name
- jokob-sk/NetAlertX★ 7.4ksame name
- netalertx/NetAlertX★ 7.4ksame name
- Galaxy-Dawn/claude-scholar★ 5.9ksame name
- github/gh-aw★ 5.6ksame name
- modelcontextprotocol/csharp-sdk★ 4.6ksame name
- antonbabenko/pre-commit-terraform★ 3.8ksame name
- github/squad★ 3.4ksame name
178 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- api-contract-designerSkill
- api-testerSkill
- bug-diagnoserSkill
- cache-governorSkill
- ci-cd-setupSkill
- code-migratorSkill
- code-reviewerSkill
- commit-message-writerSkill
- db-migration-reviewerSkill
- db-schema-designerSkill
- dev-env-troubleshooterSkill
- frontend-debugSkill
- log-analysisSkill
- meeting-minutesSkill
- natural-chinese-writerSkill
- performance-profilerSkill
- release-note-writerSkill
- requirement-clarifierSkill
- requirements-reviewerSkill
- security-reviewerSkill
- skill-creator-cnSkill
- skill-style-guideSkill
- sql-reviewerSkill
- task-decomposerSkill
- tdd-workflowSkill
- tech-design-writerSkill
- tech-doc-writerSkill
- weekly-reportSkill
The file
Files
Git 工作流规范
何时使用
- 提交历史混乱(一次提交塞了很多改动);
- 分支命名随意("test""123""new");
- 用户说"帮我把提交整理干净""squash 一下";
- 冲突需要处理,或需要规划合并策略。
使用步骤
第 1 步:检查现状
git status
git log --oneline --graph -20 # 最近的提交历史
git branch -a # 分支情况第 2 步:规划目标历史
确定:
- 哪些改动应该合并成一个 commit;
- 每个 commit 的提交信息(遵循 commit-message-writer 规范);
- 是否要拆分成多个 commit。
第 3 步:整理历史
常用操作:
# 合并最近 N 个提交
git rebase -i HEAD~N
# 拆分暂存内容
git add -p
# 修改最近一次提交信息
git commit --amend原则:
- 原子提交:一个 commit 只做一件事,可独立回滚;
- 提交信息遵循
<type>: <subject>规范; - 功能分支命名:
feature/<说明>、fix/<说明>、docs/<说明>; - 个人分支上优先
rebase保持线性历史;共享分支禁止改写已推送历史; - 合入主干推荐 squash 合并或 rebase 合并,保持主干整洁。
第 4 步:处理冲突
- 冲突时逐个文件解决,保留双方合理逻辑;
- 解决后执行
git add并继续 rebase/merge; - 冲突解决后运行测试确认无回归;
- 输出冲突解决说明(哪些取舍、依据是什么)。
第 5 步:验证
git log --oneline --graph
git status确认:历史线性、commit 原子、信息规范、工作区干净。
输入与输出
- 输入:当前仓库状态 + 期望整理目标;
- 输出:整理后的提交历史 + 操作记录说明。
示例
用户: "帮我 squash 最近 3 个提交。"
执行:
git rebase -i HEAD~3
# 将后两个 pick 改为 squash结果:
feat(api): 增加用户注册接口参考
分支命名、原子提交、rebase/merge 选择和命令速查见 references/GIT_CHEATSHEET.md。
辅助脚本
scripts/git_stats.py 统计最近提交的类型分布、作者分布,标出信息不规范或超长的提交:
python scripts/git_stats.py --count 50脚本只做统计,结论需要人确认。
注意事项
- 改写已推送的共享分支历史前必须确认,未经确认不做
push -f; - 不执行
git reset --hard、git clean -f等破坏性命令,除非用户明确要求; - 操作前建议备份:记录当前 HEAD 的 hash;
- 整理历史不等于掩盖问题,提交信息要如实描述改动。
不适用场景
- 仓库历史是共享且不可改写的(只给建议不动手);
- 用户只需要一次提交(用 commit-message-writer);
- 尚未初始化的仓库(先
git init)。
验证方式
- 触发:"整理一下提交历史";
- 检查:每个 commit 只包含一件事,信息规范,历史线性;
- 验证:工作区干净,测试通过。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

