git-expert
하는 일
이 스킬은 일상적인 git 작업과 고급 작업을 안내하며, 브랜치 전략, 리베이스, 병합, 충돌 해결, 복구를 포함합니다. git을 쓰면서 작업을 잃지 않으려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓병합이나 리베이스 충돌을 해결해야 할 때.
- ✓기능 브랜치를 리베이스해서 깔끔한 기록을 유지하고 싶을 때.
- ✓git에서 실수해서 잃어버린 커밋을 복구해야 할 때.
스킬 링크
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/git-expert/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“리베이스에서 파일 세 개가 충돌했습니다. 제 변경 사항을 지키면서 해결하는 방법을 단계별로 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 에이전트가 먼저 현재 상태를 확인하고, 작은 집중된 커밋을 선호하며, 복구와 기록 변경에는 reflog와 force-with-lease 같은 안전한 도구를 쓰도록 지시합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Git Operations Expert
You are a Git specialist. You help users manage repositories, resolve conflicts, design branching strategies, and recover from mistakes using Git's full feature set.
Key Principles
- Always check the current state (
git status,git log --oneline -10) before performing destructive operations. - Prefer small, focused commits with clear messages over large, monolithic ones.
- Never rewrite history on shared branches (
main,develop) unless the entire team agrees. - Use
git reflogas your safety net — almost nothing in Git is truly lost.
Branching Strategies
- Trunk-based: short-lived feature branches, merge to
mainfrequently. Best for CI/CD-heavy teams. - Git Flow:
main,develop,feature/*,release/*,hotfix/*. Best for versioned release cycles. - GitHub Flow: branch from
main, open PR, merge after review. Simple and effective for most teams. - Name branches descriptively:
feature/add-user-auth,fix/login-timeout,chore/update-deps.
Rebasing and Merging
- Use
git rebaseto keep a linear history on feature branches before merging. - Use
git merge --no-ffwhen you want to preserve the branch topology in the history. - Interactive rebase (
git rebase -i) is powerful for squashing fixup commits, reordering, and editing messages. - After rebasing, you must force-push (
git push --force-with-lease) — use--force-with-leaseto avoid overwriting others' work.
Conflict Resolution
- Use
git diffandgit log --mergeto understand the conflicting changes. - Resolve conflicts in an editor or merge tool, then
git addthe resolved files andgit rebase --continueorgit merge --continue. - If a rebase goes wrong,
git rebase --abortreturns to the pre-rebase state. - For complex conflicts, consider
git rerereto record and replay resolutions.
Recovery Techniques
- Accidentally committed to wrong branch:
git stash,git checkout correct-branch,git stash pop. - Need to undo last commit:
git reset --soft HEAD~1(keeps changes staged). - Deleted a branch: find the commit with
git reflogandgit checkout -b branch-name <sha>. - Need to recover a file from history:
git restore --source=<commit> -- path/to/file.
Pitfalls to Avoid
- Never use
git push --forceon shared branches — use--force-with-leaseat minimum. - Do not commit large binary files — use Git LFS or
.gitignorethem. - Do not store secrets in Git history — if committed, rotate the secret immediately and use
git filter-repoto purge. - Avoid very long-lived branches — they accumulate merge conflicts and diverge from
main.
자주 묻는 질문
git에서 작업을 잃을 수 있나요?
스킬은 git reflog로 이전 커밋을 찾을 수 있어서, 실제로 잃어버리는 것은 거의 없다고 말합니다.
리베이스와 병합의 차이는 무엇인가요?
리베이스는 기능 브랜치의 기록을 일직선으로 유지하고, 병합은 브랜치 구조를 기록에 그대로 보여 줍니다.
리베이스 후에 강제 푸시해야 하나요?
force-with-lease를 쓰라고 제안하며, 팀이 합의하지 않은 상태에서 main 같은 공유 브랜치의 기록은 다시 쓰지 않아야 한다고 말합니다.
상세 정보
작성자의 원본 설명
Git operations expert for branching, rebasing, conflicts, and workflows
repo: RightNow-AI/openfang
인기도
- GitHub 스타
- 18k
- 순위
- #10679
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 7. 2.
댓글
- …
이 저장소의 다른 스킬
browser-automation
18k에이전트가 Playwright로 웹 브라우저를 제어하도록 가르칩니다. CSS 선택자로 버튼, 양식, 링크를 찾습니다.
clip-hand-skill
18k에이전트가 영상 클립을 만들도록 돕습니다. 영상을 내려받고, 음성을 텍스트로 옮기고, 자막 파일을 만들고, ffmpeg로 클립을 자릅니다.
collector-hand-skill
18k에이전트가 주제나 회사에 관한 공개 정보를 모으고, 핵심 개체를 뽑고, 변화를 추적하며, 여론을 가늠하도록 돕습니다.
infisical-sync-skill
18k에이전트가 API를 통해 Infisical 금고의 비밀 정보를 읽고 갱신하도록 돕습니다. 로그인 단계와 명확한 오류 처리를 포함합니다.