git-workflow
自信地掌握 Git 工作流
也可从以下获取: 0xDarkMatter,0xDarkMatter,Joseph OBrien,Cain96,Joseph OBrien,Barnhardt-Enterprises-Inc,AI-Vibe-Prompts,Doyajin174
正在为 Git 分支、合并和冲突而烦恼?本技能为所有 Git 操作提供清晰的分步指导,并包含团队协作的最佳实践。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“git-workflow”。 Write a commit message for adding login functionality
预期结果:
feat(auth): implement user login system
- Add login form component with validation
- Create authentication API endpoint
- Integrate session management middleware
- Add unit tests for login flow
Closes #156
正在使用“git-workflow”。 How do I undo my last commit but keep my changes?
预期结果:
Use: git reset --soft HEAD~1
This removes the commit but keeps all changes staged. If you want to unstage them too, use: git reset HEAD~1
安全审计
安全This skill is a documentation-only guide for Git workflows. Static analysis flagged 77 shell command patterns, 6 URLs, and 14 crypto patterns, but all are false positives. The detected patterns are Markdown code blocks (```bash) and inline code markers (`command`) used for documentation formatting, not executable code. URLs are reference links to official Git documentation. No actual security risks exist.
质量评分
你能构建什么
新开发者入职
帮助初级开发人员学习正确的 Git 工作流,提供分支、提交和安全合并代码的引导示例。
团队工作流标准化
在开发团队中建立一致的提交消息格式和分支命名约定。
冲突解决协助
在功能集成过程中遇到复杂合并冲突时,获得清晰的分步指导。
试试这些提示
Help me write a commit message for changes that add user authentication with JWT tokens to my application.
I need to start working on a new feature for the shopping cart. What branch should I create and how?
I'm getting conflicts when rebasing my feature branch onto main. Walk me through resolving them step by step.
I have 5 messy commits on my feature branch. Help me squash and reorganize them before merging to main.
最佳实践
- 编写小而专注的提交,一次只更改一件事
- 使用规范化提交格式:type(scope): subject
- 开始新工作前始终拉取最新更改
- 永远不要直接提交到 main 分支
- 合并后删除功能分支以保持历史清晰
避免
- 使用 'fix' 或 'update' 等模糊的提交消息 - 要具体说明更改内容
- 使用 git push --force 而不加 --force-with-lease - 可能覆盖队友的工作
- 提交大量不相关的更改 - 使审查和回滚变得困难
- 忽略合并冲突并强制推送 - 导致代码丢失