omh-git-workflow
하는 일
병합 충돌을 해결하고, bisect로 잘못된 커밋을 찾거나, 기록을 복구하는 계획을 세웁니다. 이미 푸시된 것이 무엇인지 확인한 뒤 어떤 것도 다시 쓰지 않습니다. git 문제로 막힌 개발자를 위한 스킬입니다.
사용하는 경우
- ✓병합이나 리베이스 충돌이 나서 안전하게 해결해야 할 때.
- ✓커밋이 무언가를 망가뜨려서 어느 커밋인지 찾고 싶을 때.
- ✓리뷰 전에 브랜치 기록을 정리해야 할 때.
스킬 링크
https://github.com/rlaope/oh-my-hermes/blob/main/agent-skills/omh-git-workflow/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“리뷰 전에 이 브랜치의 기록을 정리해 주세요. 작업이 하나도 사라지지 않게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트가 먼저 이미 푸시된 것을 나열하고, 백업 지점을 정한 뒤, 다시 쓰기나 해결을 단계별로 계획합니다. 강제 푸시는 더 안전한 lease 방식으로만 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Git Workflow
This is an OMH git-workflow workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
Why This Exists
git-workflow exists because conflict resolution, bisect, and history repair had no owner: "resolve this merge conflict" reached a file operator and "clean up this branch's history" a live-information lane, while this repository's own incidents -- a stack that replayed its base commits, a commit landing on another session's branch -- each had a known correct procedure.
First Steps
- Name what is already pushed: each branch involved with its local head, its remote head, and whether others may have fetched it.
- Before any step that rewrites history, name its recovery point.
Do Not Use When
- The request is to write the commit message or the PR body for a finished change; use
omh-commit-pr-authoring. - The request is to find defects in a diff before merging it; use
omh-code-review. - The build or CI job fails and the question is why; use
omh-build-failure-triage. - The request is a code change to deliver rather than branch or history repair; use
ulw-work.
Examples
Good example:
- Prompt: clean up this branch's history before review
- Expected behavior: Prepare pushed_state_inventory/v1 first, then history_rewrite_plan/v1 with a backup branch before the interactive rebase and
--force-with-leasefor the push, naming who must re-fetch. - Why: Whether the branch is pushed decides whether the cleanup is local or shared.
Bad example:
- Prompt: just force push my rebased branch over main
- Expected behavior: Refuse the bare force-push: inventory what is pushed on main, and plan
--force-with-leaseonto the feature branch only. - Why: A bare force-push over a shared branch discards other people's commits without a check.
Completion Checklist
- The pushed-state inventory names every branch the plan touches.
- Every rewriting step has a recovery point in front of it.
- Every force-push in the plan uses
--force-with-lease. - Generated and counted files in a conflict are re-derived, not picked.
- Resolution, bisect verdict, and push are reported only from observed output.
Recovery Notes
- If the remote state is unknown, plan
git fetchand the inventory first and rewrite nothing until it is observed. - If a rewrite went wrong, recover from the recovery point or the reflog entry before trying anything else.
When to Use
Use when a git branch needs repair rather than new code: a merge or rebase conflict to resolve, a regression to bisect to the commit that introduced it, or history to rewrite, squash, recover, or rebase -- including a stack of branches. The work is a plan that names what is already pushed, what each step rewrites, and how to get back.
Strong routing signals: `git-workflow`, `git workflow`, `merge conflict`, `merge conflicts`, `rebase conflict`, `resolve the conflict`, `resolve this conflict`, `conflict markers`, `git bisect`, `bisect`, `which commit broke`, `find the commit that broke`, `rewrite history`, `rewrite the history`, `branch history`, `branch's history`, `clean up the history`, `interactive rebase`, `squash commits`, `squash the commits`, `force push`, `force-push`, `force-with-lease`, `reflog`, `git reset`, `lost commit`, `recover the commit`, `undo the last commit`, `cherry-pick`, `stacked prs`, `stacked branches`, `rebase the stack`, `detached head`
Catalog Metadata
Category: verification
Phase: git-repair
Quality tier: history-safety-gated
Reasoning demand: standard
Quality bar:
- Start with the pushed-state inventory; a plan without it cannot say which steps are safe.
- Mark every step that rewrites history and put its recovery point in front of it.
- Load
references/git-repair-method.mdfor the conflict, bisect, rewrite, and stacked-branch procedures instead of improvising them. - For a stack of branches, rebase each onto the new head of the one below with
--ontoand the old base, never with a merge-base computed after the base moved. - Report each step's observed output, and keep resolved, verified, and pushed as separate states.
Required inputs:
- the branch or branches involved and their upstreams
- what is already pushed, and who else may have fetched it
- the conflict, the regression, or the history problem as observed
- for a bisect: a known good commit, a known bad commit, and the command that tells them apart
- the repository's merge policy: merge com
자주 묻는 질문
기록을 다시 쓰다가 작업을 잃을 수 있나요?
다시 쓰기 전에 백업 브랜치를 만들고, 이미 푸시된 것을 명시합니다.
강제 푸시를 하나요?
더 안전한 lease 방식으로만, 푸시된 상태를 확인한 뒤에 합니다.
코드 버그도 검토하나요?
아니요. 버그 검토는 별도의 코드 검토 스킬이 다룹니다.
상세 정보
작성자의 원본 설명
[omh] Git branch in trouble -- a merge conflict, a commit that broke something, history to repair: plan the resolution, the bisect, or the rewrite, name what is already pushed first, and force-push only with `--force-with-lease`. Use when the user says: git-workflow, git workflow, merge conflict, merge conflicts, rebase conflict, resolve the conflict, resolve this conflict, conflict markers.
repo: rlaope/oh-my-hermes
인기도
- GitHub 스타
- 5.1k
- 순위
- #15112
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
omh-accessibility-audit
5.1k에이전트가 화면이나 흐름을 키보드 사용, 스크린 리더 레이블, 명암비, 터치 대상 크기 측면에서 접근성 부족이 없는지 점검하도록 돕습니다.
omh-adversarial-consensus
5.1k에이전트가 기술 제안을 독립된 여러 관점에서 공격하고, 결정 전에 살아남는 내용을 요약하도록 돕습니다.
omh-agent-debug
5.1k다른 AI 에이전트가 왜 멈추거나, 반복하거나, 방향을 잃는지 알아내고, 가장 작고 안전한 복구 방법을 제안하도록 돕습니다.
omh-agent-instructions
5.1kAI 도구가 프로젝트에서 어떻게 작업할지 알려 주는 지침 파일, 예를 들어 AGENTS.md나 CLAUDE.md를 작성하거나 업데이트하도록 돕습니다.