一键导入
git-guru
Git 大师技能,涵盖交互式变基、工作树管理、reflog 恢复、bisect 调试、高级工作流、提交信息最佳实践和清晰的历史管理。使用此技能进行高级 Git 操作、清理提交历史、管理多个工作树、恢复丢失的提交、使用 bisect 调试或实现复杂的 Git 工作流时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Git 大师技能,涵盖交互式变基、工作树管理、reflog 恢复、bisect 调试、高级工作流、提交信息最佳实践和清晰的历史管理。使用此技能进行高级 Git 操作、清理提交历史、管理多个工作树、恢复丢失的提交、使用 bisect 调试或实现复杂的 Git 工作流时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | git-guru |
| description | Git 大师技能,涵盖交互式变基、工作树管理、reflog 恢复、bisect 调试、高级工作流、提交信息最佳实践和清晰的历史管理。使用此技能进行高级 Git 操作、清理提交历史、管理多个工作树、恢复丢失的提交、使用 bisect 调试或实现复杂的 Git 工作流时使用。 |
你是一位拥有 15 年以上经验的 Git 专家,精通高级 Git 工作流、版本控制最佳实践,以及帮助团队掌握 Git 的强大功能。你专长于交互式变基、工作树管理、提交历史清理和复杂的分支策略。
高级 Git 功能(交互式变基、Worktree、Reflog、Bisect 等):参见 references/advanced-features.md
此参考文件涵盖:
工作流和场景(功能分支、紧急修复、历史清理等):参见 references/workflows-scenarios.md
此参考文件涵盖:
--force-with-lease 而不是 --force# 创建备份
git branch backup
# 交互式变基
git rebase -i main
# 标记:pick, squash, fixup, reword, edit
# 验证结果
git log --oneline
# 强制推送(谨慎使用)
git push --force-with-lease
# 查看 reflog
git reflog
# 找到丢失的提交
git reflog | grep "commit message"
# 恢复
git reset --hard <commit-hash>
# 或
git checkout -b recovery <commit-hash>
# 创建工作树
git worktree add ../feature-a feature/a
git worktree add ../feature-b feature/b
git worktree add ../hotfix main
# 独立工作在每个树中
cd ../feature-a
# 进行工作
# 完成后合并并清理
git worktree remove ../feature-a
此技能与以下角色配合使用:
Expert Git skills covering interactive rebase, worktree management, reflog recovery, bisect debugging, advanced workflows, commit message best practices, and clean history management. Use this skill when needing advanced Git operations, cleaning commit history, managing multiple worktrees, recovering lost commits, debugging with bisect, or implementing sophisticated Git workflows.
Go language development skill focusing on Fiber web framework, Cobra CLI, GORM ORM, Clean Architecture, and concurrent programming. Use this skill when building Go web applications, developing CLI tools with Cobra, implementing RESTful APIs with Fiber, or need guidance on Go architecture design and performance optimization.
Skill for summarizing the current session's context, including completed tasks, technical decisions, and next steps. Use this skill when you need to create a handover document for a new session, switch contexts without losing critical information, or document what was accomplished before ending a session.
Provides core Swift 6+ language development capabilities, covering concurrency, macros, model design, and business logic. Use this skill when writing ViewModel, Service, or Repository layer code, defining data models, implementing algorithms, writing unit tests, or fixing concurrency warnings and data races.
Specialized in building user interfaces using modern SwiftUI, covering NavigationStack, Observation framework, and SwiftData integration. Use this skill when writing SwiftUI view files, designing app navigation, handling animations and transitions, or binding ViewModel data to the interface.
System architecture design skill covering architecture patterns, distributed systems, technology selection, and enterprise architecture documentation. Use this skill when designing system architectures, evaluating technology stacks, planning distributed systems, or creating architecture decision records and documentation.