git-advanced-workflows
Advanced Git workflows - rebase, cherry-pick, bisect, worktrees, reflog - for clean history and recovery
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-07
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- git-advanced-workflows
- description
- Advanced Git workflows - rebase, cherry-pick, bisect, worktrees, reflog - for clean history and recovery
- when_to_use
- Use when managing complex histories, collaborating on branches, or troubleshooting a repo.
02 资源文件 6
- 参考文档references/bisect.md1.0 KB
- 参考文档references/cherry-pick.md1.0 KB
- 参考文档references/history-rewrite.md1.4 KB
- 参考文档references/rebase.md2.4 KB
- 参考文档references/reflog-recovery.md1.2 KB
- 参考文档references/worktrees.md1.1 KB
03 SKILL.md 正文
Git Advanced Workflows
Master advanced Git techniques to maintain clean history, collaborate effectively, and recover from any situation with confidence.
When to Use This Skill
- Cleaning up commit history before merging
- Applying specific commits across branches
- Finding commits that introduced bugs
- Working on multiple features simultaneously
- Recovering from Git mistakes or lost commits
- Managing complex branch workflows
- Preparing clean PRs for review
- Synchronizing diverged branches
Which Tool for Which Situation
| Situation | Tool | Reference |
|---|---|---|
| Clean up / squash / reword / reorder / split commits before a PR | Interactive rebase | references/rebase.md |
Update a feature branch with main, decide rebase vs merge |
Rebase / merge | references/rebase.md |
| Apply a single commit (e.g. hotfix) to other branches/releases | Cherry-pick | references/cherry-pick.md |
| Apply only specific files from a commit | Partial cherry-pick | references/cherry-pick.md |
| Find the commit that introduced a bug | Bisect | references/bisect.md |
| Work on multiple branches at once without stashing | Worktrees | references/worktrees.md |
| Recover lost commits / deleted branches / undo a bad reset | Reflog & recovery | references/reflog-recovery.md |
| Abort an in-progress rebase/merge/cherry-pick/bisect | Recovery commands | references/reflog-recovery.md |
| Safety rules before rewriting shared history | Best practices & pitfalls | references/history-rewrite.md |
Read the matching references/*.md file when you need the detailed commands and worked examples for that situation. Load only the references relevant to the task at hand.
References
references/rebase.md- interactive rebase operations, clean-up-before-PR workflow, rebase vs merge strategy, autosquash, splitting commits.references/cherry-pick.md- cherry-picking single commits/ranges, hotfix-to-multiple-releases workflow, partial (per-file) cherry-pick.references/bisect.md- manual and automatedgit bisectto locate a bug-introducing commit.references/worktrees.md- managing multiple worktrees for simultaneous multi-branch development.references/reflog-recovery.md- using reflog to recover lost commits/branches, undo resets, and abort in-progress operations.references/history-rewrite.md- cross-cutting best practices and common pitfalls when rewriting history (force-with-lease, backups, public branches).
04 同仓库更多 Skills
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.
vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API