git

dalestudy/skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/dalestudy/skills --skill git
0 commentsdiscussion
summary

Git 버전 관리 모범 관례 및 워크플로우 가이드.

skill.md

Git

Git 버전 관리 모범 관례 및 워크플로우 가이드.

커밋 메시지 컨벤션

Conventional Commits 사용

커밋 메시지는 <type>: <description> 형식을 따른다:

feat: add form validation to login page
fix: prevent duplicate email check error on signup
docs: add installation guide to README
refactor: extract auth logic into separate module
test: add payment feature tests
chore: update dependencies

주요 타입

타입 설명 예시
feat 새로운 기능 추가 feat: add dark mode support
fix 버그 수정 fix: prevent token deletion on logout
docs 문서 변경 (코드 변경 없음) docs: update API documentation
style 코드 포맷팅, 세미콜론 누락 (동작 변경 X) style: apply ESLint rules
refactor 리팩토링 (기능 변경 없음) refactor: extract utility functions
test 테스트 코드 추가/수정 test: add login API tests
chore 빌드, 설정 변경 (src 변경 없음) chore: update Webpack config
perf 성능 개선 perf: implement lazy loading for images

상세 형식 (선택사항)

<type>(<scope>): <subject>

<body>

<footer>

예시:

feat(auth): implement JWT-based authentication

- Issue access and refresh tokens
- Store refresh tokens in Redis
- Add token renewal API endpoint

Closes #123

자주 하는 실수

# ❌ 타입 누락
git commit -m "bug fix"

# ❌ 모호한 설명
git commit -m "fix: fix issue"

# ❌ 한 커밋에 여러 작업
git commit -m "feat: implement login, signup, and password reset"

# ✅ 명확하고 단일 책임
git commit -m "feat: add form validation to login page"

커밋 메시지 작성 가이드라인

  1. 첫 줄은 50자 이내 - 간결한 요약
  2. 현재형 사용 - "added" (X) → "add" (O)
  3. 명령형 어조 - "adds" (X) → "add" (O)
  4. 첫 글자 소문자 - Feat: (X) → feat: (O)
  5. 마침표 금지 - feat: add feature. (X) → feat: add feature (O)
  6. 본문은 72자마다 줄바꿈 - 가독성 향상
  7. Why > What - 변경한 내용보다 변경한 이유를 설명
  8. 영어로 작성 - 릴리즈 노트 생성 도구와의 호환성을 위해

GitHub Flow 워크플로우

브랜치 전략

main (항상 배포 가능한 상태)
├── feature/login-form
├── fix/payment-error
└── refactor/user-service

기본 브랜치

새 저장소 생성 시 기본 브랜치는 main을 사용한다 (과거의 master 대신):

# 새 저장소 초기화 시 main 브랜치로 시작
git init -b main

# 또는 기존 저장소에서 기본 브랜치 변경
git branch -m master main
git push -u origin main

# Git 전역 설정 (모든 새 저장소에 적용)
git config --global init.defaultBranch main

참고: GitHub, GitLab, Bitbucket 등 대부분의 Git 호스팅 서비스는 2020년부터 기본 브랜치를 main으로 사용한다.

브랜치 네이밍

# 형식: <type>/<description>
feature/user-authentication
fix/header-layout-bug
refactor/payment-module
docs/api-documentation
test/user-service
chore/update-dependencies

작업 흐름

# 1. main에서 최신 상태 받기
git switch main
git pull origin main

# 2. 새 브랜치 생성
git switch -c feature/dark-mode

# 3. 작업 후 커밋
git add .
git commit -m "feat: add dark mode toggle button"

# 4. 원격 브랜치에 푸시
git push origin feature/dark-mode

# 5. GitHub에서 PR 생성
gh pr create --title "feat: add dark mode support" --body "..."

# 6. 코드 리뷰 후 main에 병합 (GitHub UI 또는 CLI)
gh pr merge <PR번호> --squash  # 또는 --merge, --rebase

# 7. 로컬 main 업데이트 및 브랜치 삭제
git switch main
git pull origin main
git branch -d feature/dark-mode

PR 병합 전략

전략 설명 언제 사용
Squash 모든 커밋을 하나로 합침 기능 브랜치 (권장)
Merge 병합 커밋 생성, 히스토리 보존 릴리스 브랜치
Rebase 선형 히스토리 유지, 병합 커밋 X 간단한 변경, 깔끔한 히스토리
# Squash (권장 - 기능 단위로 커밋 정리)
gh pr merge 123 --squash

# Merge (히스토리 보존)
gh pr merge 123 --merge

# Rebase (선형 히스토리)
gh pr merge 123 --rebase

Git 히스토리 관리

Rebase

Interactive Rebase (커밋 정리)

# 최근 3개 커밋 수정
git rebase -i HEAD~3

# 에디터에서 명령어 선택
# pick   → 커밋 유지
# reword → 커밋 메시지 수정
# edit   → 커밋 수정
# squash → 이전 커밋에 합침
# fixup  → 이전 커밋에 합침 (메시지 제거)
# drop   → 커밋 삭제

예시:

# Before
pick a1b2c3d feat: implement login feature
pick d4e5f6g fix: typo in variable name
pick g7h8i9j fix: rename variable for clarity

# After (squash 사용)
pick a1b2c3d feat: implement login feature
fixup d4e5f6g fix: typo in variable name
fixup g7h8i9j fix: rename variable for clarity

Rebase onto main (브랜치 최신화)

# 1. main 최신화
git switch main
git pull origin main

# 2. feature 브랜치를 main 위로 rebase
git switch feature/my-feature
git rebase main

# 3. 충돌 발생 시
# - 파일 수정 후
git add .
git rebase --continue

# - rebase 취소하고 싶다면
git rebase --abort

Cherry-pick (특정 커밋만 가져오기)

# 다른 브랜치의 커밋 하나만 적용
git cherry-pick <commit-hash>

# 여러 커밋 적용
git cherry-pick <commit-hash1> <commit-hash2>

# 충돌 발생 시
git add .
git cherry-pick --continue

Commit Amend (마지막 커밋 수정)

# 마지막 커밋 메시지만 수정
git commit --amend -m "fix: correct commit message"

# 마지막 커밋에 파일 추가
git add forgotten-file.ts
git commit --amend --no-edit

# ⚠️ 주의: 이미 push한 커밋은 amend 금지 (히스토리 변경됨)

Reset vs Revert

# Reset - 커밋 취소 (히스토리 삭제)
git reset --soft HEAD~1   # 커밋만 취소, 변경사항 유지
git reset --mixed HEAD~1  # 커밋 + staging 취소, 변경사항 유지 (기본값)
git reset --hard HEAD~1   # 커밋 + 변경사항 모두 삭제 (위험!)

# ⚠️ push한 커밋은 reset 금지 → revert 사용

# Revert - 커밋을 되돌리는 새 커밋 생성 (히스토리 보존)
git revert <commit-hash>
git revert HEAD  # 마지막 커밋 되돌리기

Merge Conflict 해결

Conflict 발생 시나리오

# main을 merge하거나 rebase할 때 충돌 발생
git merge main
# 또는
git rebase main

# Auto-merging src/index.ts
# CONFLICT (content): Merge conflict in src/index.ts

Conflict 해결 과정

# 1. 충돌 파일 확인
git status

# 2. 파일 열어서 수동 수정
# <<<<<<< HEAD (현재 브랜치)
# 내 변경사항
# =======
# 상대 브랜치의 변경사항
# >>>>>>> main

# 3. 마커 제거하고 코드 수정
# 4. 해결된 파일 staging
git add src/index.ts

# 5. Merge 완료
git merge --continue
# 또는 Rebase 계속
git rebase --continue

Conflict 해결 전략

# 현재 브랜치 변경사항 우선
git restore --ours <file>

# 상대 브랜치 변경사항 우선
git restore --theirs <file>

# merge 취소
git merge --abort

# rebase 취소
git rebase --abort

자주 사용하는 명령어

브랜치 작업 (git switch)

# 기존 브랜치로 전환
git switch main
git switch feature/my-feature

# 새 브랜치 생성 + 전환
git switch -c feature/new-feature

# 이전 브랜치로 돌아가기
git switch -

# 원격 브랜치 추적하며 전환
git switch -c local-branch origin/remote-branch

참고: Git 2.23+ (2019년 8월)부터 git switch를 사용한다. 기존 git checkout은 브랜치 전환, 파일 복원 등 여러 역할을 담당해 혼란을 야기했다. git switch는 브랜치 전환만 담당한다.

파일 복원 (git restore)

# 작업 디렉토리 파일 복원 (unstaged 변경사항 취소)
git restore <file>

# Staging 취소 (unstaged로 되돌림)
git restore --staged <file>

# 작업 디렉토리 + Staging 모두 복원
git restore --staged --worktree <file>

# 특정 커밋의 파일로 복원
git restore --source=<commit-hash> <file>

참고: git restore는 파일 복원 전용 명령어다. 기존 git checkout -- <file>을 대체한다.

상태 확인

git stat
how to use git

How to use git on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add git
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/dalestudy/skills --skill git

The skills CLI fetches git from GitHub repository dalestudy/skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/git

Reload or restart Cursor to activate git. Access the skill through slash commands (e.g., /git) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.527 reviews
  • Shikha Mishra· Dec 20, 2024

    git is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Yuki Patel· Sep 13, 2024

    Solid pick for teams standardizing on skills: git is focused, and the summary matches what you get after install.

  • Oshnikdeep· Sep 9, 2024

    git fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Aarav Garcia· Sep 1, 2024

    I recommend git for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Ganesh Mohane· Aug 28, 2024

    Registry listing for git matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Aarav Johnson· Aug 20, 2024

    git reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Yuki Okafor· Aug 4, 2024

    We added git from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Evelyn Park· Jul 23, 2024

    Keeps context tight: git is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Sakshi Patil· Jul 19, 2024

    git reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Aarav Mensah· Jul 11, 2024

    Registry listing for git matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 27

1 / 3