본문으로 건너뛰기
Skillpedia
일반 코딩18k · #10679

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/git-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 reflog as your safety net — almost nothing in Git is truly lost.

Branching Strategies

  • Trunk-based: short-lived feature branches, merge to main frequently. 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 rebase to keep a linear history on feature branches before merging.
  • Use git merge --no-ff when 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-lease to avoid overwriting others' work.

Conflict Resolution

  • Use git diff and git log --merge to understand the conflicting changes.
  • Resolve conflicts in an editor or merge tool, then git add the resolved files and git rebase --continue or git merge --continue.
  • If a rebase goes wrong, git rebase --abort returns to the pre-rebase state.
  • For complex conflicts, consider git rerere to 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 reflog and git 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 --force on shared branches — use --force-with-lease at minimum.
  • Do not commit large binary files — use Git LFS or .gitignore them.
  • Do not store secrets in Git history — if committed, rotate the secret immediately and use git filter-repo to 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬