본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)280k · #185

git-workflow

하는 일

이 가이드는 버전 관리 시스템인 Git을 쓰는 모범 사례를 가르칩니다. 코드 이력을 정리하는 방법, 변경에 대한 명확한 메시지를 쓰는 방법, 팀에서 가장 좋은 작업 방식을 고르는 방법을 설명합니다.

사용하는 경우

  • ✓새 프로젝트를 시작하고 코드를 어떻게 관리할지 정할 때.
  • ✓GitHub Flow나 GitFlow 같은 코드 구성 전략을 고를 때.
  • ✓변경 내용을 설명하는 커밋 메시지를 쓸 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/git-workflow/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

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

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

AI에게 요청하는 예시

“Git Flow를 사용해 제 프로젝트를 어떻게 정리하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

GitHub Flow(단순하며 대부분에 적합)와 GitFlow(더 복잡하며 계획된 릴리스가 있는 프로젝트용)처럼 서로 다른 구성 모델을 제공합니다. 또한 명확한 패턴에 따라 커밋 메시지를 쓰는 방법도 가르칩니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Git Workflow Patterns

Best practices for Git version control, branching strategies, and collaborative development.

When to Activate

  • Setting up Git workflow for a new project
  • Deciding on branching strategy (GitFlow, trunk-based, GitHub flow)
  • Writing commit messages and PR descriptions
  • Resolving merge conflicts
  • Managing releases and version tags
  • Onboarding new team members to Git practices

Branching Strategies

GitHub Flow (Simple, Recommended for Most)

Best for continuous deployment and small-to-medium teams.

main (protected, always deployable)
  │
  ├── feature/user-auth      → PR → merge to main
  ├── feature/payment-flow   → PR → merge to main
  └── fix/login-bug          → PR → merge to main

Rules:

  • main is always deployable
  • Create feature branches from main
  • Open Pull Request when ready for review
  • After approval and CI passes, merge to main
  • Deploy immediately after merge

Trunk-Based Development (High-Velocity Teams)

Best for teams with strong CI/CD and feature flags.

main (trunk)
  │
  ├── short-lived feature (1-2 days max)
  ├── short-lived feature
  └── short-lived feature

Rules:

  • Everyone commits to main or very short-lived branches
  • Feature flags hide incomplete work
  • CI must pass before merge
  • Deploy multiple times per day

GitFlow (Complex, Release-Cycle Driven)

Best for scheduled releases and enterprise projects.

main (production releases)
  │
  └── develop (integration branch)
        │
        ├── feature/user-auth
        ├── feature/payment
        │
        ├── release/1.0.0    → merge to main and develop
        │
        └── hotfix/critical  → merge to main and develop

Rules:

  • main contains production-ready code only
  • develop is the integration branch
  • Feature branches from develop, merge back to develop
  • Release branches from develop, merge to main and develop
  • Hotfix branches from main, merge to both main and develop

When to Use Which

Strategy Team Size Release Cadence Best For
GitHub Flow Any Continuous SaaS, web apps, startups
Trunk-Based 5+ experienced Multiple/day High-velocity teams, feature flags
GitFlow 10+ Scheduled Enterprise, regulated industries

Commit Messages

Conventional Commits Format

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

[optional body]

[optional footer(s)]

Types

Type Use For Example
feat New feature feat(auth): add OAuth2 login
fix Bug fix fix(api): handle null response in user endpoint
docs Documentation docs(readme): update installation instructions
style Formatting, no code change style: fix indentation in login component
refactor Code refactoring refactor(db): extract connection pool to module
test Adding/updating tests test(auth): add unit tests for token validation
chore Maintenance tasks chore(deps): update dependencies
perf Performance improvement perf(query): add index to users table
ci CI/CD changes ci: add PostgreSQL service to test workflow
revert Revert previous commit revert: revert "feat(auth): add OAuth2 login"

Good vs Bad Examples

# BAD: Vague, no context
git commit -m "fixed stuff"
git commit -m "updates"
git commit -m "WIP"

# GOOD: Clear, specific, explains why
git commit -m "fix(api): retry requests on 503 Service Unavailable

The external API occasionally returns 503 errors during peak hours.
Added exponential backoff retry logic with max 3 attempts.

Closes #123"

Commit Message Template

Create .gitmessage in repo root:

# <type>(<scope>): <subject>
# # Types: feat, fix, docs, style, refactor, test, chore, perf, ci, revert
# Scope: api, ui, db, auth, etc.
# Subject: imperative mood, no period, max 50 chars
#
# [optional body] - explain why, not what
# [optional footer] - Breaking changes, closes #issue

Enable with: git config commit.template .gitmessage

Merge vs Rebase

Merge (Preserves History)

# Creates a merge commit
git checkout main
git merge feature/user-auth

# Result:
# *   merge commit
# |\
# | * feature commits
# |/
# * main commits

Use when:

  • Merging feature branches into main
  • You want to preserve exact history
  • Multiple people worked on the branch

…

자주 묻는 질문

'커밋'이란 무엇인가요?

특정 시점에 코드에 가한 변경 묶음을 기록하는 프로젝트의 '저장'과 같습니다.

'merge'와 'rebase'의 차이는 무엇인가요?

'merge'는 두 브랜치의 이력을 합쳐 언제 합쳤는지 기록을 남깁니다. 'rebase'는 변경을 다른 브랜치의 최신 변경 이후에 한 것처럼 다시 정리해, 더 일직선인 이력을 만듭니다.

Conventional Commits는 왜 쓰나요?

각 변경이 무엇을 하는지(새 기능인지, 버그 수정인지 등) 빠르게 이해하도록 돕고, 릴리스 노트 생성 같은 작업을 자동화하기 쉽게 해 주기 때문입니다.

상세 정보

작성자의 원본 설명

Git workflow patterns including branching strategies, commit conventions, keeping history clean and readable, tidying local commits before merging, merge vs rebase, conflict resolution, and collaborative development best practices for teams of all sizes. Use when choosing a branching strategy, writing commit conventions, cleaning up history before a pull request, deciding merge versus rebase, or r

repo: affaan-m/ECC

인기도

GitHub 스타
280k
순위
#185
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬