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

conventional-branch

하는 일

이 도구는 코드의 별도 작업 줄기와 같은 새 Git 브랜치의 이름을 만드는 데 도움을 줍니다. 이름이 체계적인 정리를 위해 특정 패턴을 따르도록 합니다.

사용하는 경우

  • ✓코드에 새 기능을 시작할 때.
  • ✓버그를 수정할 때.
  • ✓코드가 아닌 작업을 정리할 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/conventional-branch/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/conventional-branch/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분.

작동 방식

무엇을 하고 싶은지(예: 로그인 추가)와 작업 유형(예: 기능)을 말합니다. 도구는 규칙을 따르는 브랜치 이름을 제안하며, 원하면 브랜치를 직접 만들어 줄 수도 있습니다.

기술 내용 (원본 SKILL.md)

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

Conventional Branch

Create Git branches that follow the Conventional Branch specification — a simple, consistent convention for naming Git branches.

Branch Name Format

<type>/<description>

Branch Types

Type Alias Purpose
feature/ feat/ New features or enhancements
bugfix/ fix/ Bug fixes
hotfix/ — Urgent production fixes
release/ — Release preparation (dots allowed in version: release/v1.2.0)
chore/ — Non-code tasks (deps, docs, config)

Trunk Branches

main, master, and develop are trunk branches — they do not use a prefix. Never create new branches with the same names as trunk branches; branch off them instead.

Naming Rules

  • Lowercase only — no uppercase letters anywhere
  • Alphanumerics, hyphens, and dots — a-z, 0-9, -, .
  • Dots allowed only in release/ version descriptions (e.g., release/v1.2.0)
  • No underscores, spaces, or special characters
  • No consecutive hyphens (--), dots (..), or hyphen-dot adjacency (-. or .-)
  • No leading or trailing hyphens or dots in the description

Valid Examples

main
master
develop
feature/add-login-page
feat/add-login-page
bugfix/fix-header-bug
fix/header-bug
hotfix/security-patch
release/v1.2.0
chore/update-dependencies
feature/issue-123-new-login

Invalid Examples

Branch Problem
Feature/Add-Login Uppercase letters
feature/new--login Consecutive hyphens
feature/-new-login Leading hyphen
feature/new-login- Trailing hyphen
release/v1.-2.0 Hyphen adjacent to dot
fix/header bug Space
fix/header_bug Underscore
unknown/some-task Unknown prefix type

Description Guidelines

  • Use kebab-case with 2-5 words
  • Be descriptive but concise (~50 chars total)
  • Good: add-oauth-login, fix-header-overflow, update-ci-config
  • Bad: fix-bug, new-feature

Workflow

Follow these steps:

Step 1 — Determine Branch Type

Ask the user (if not already clear):

  • Branch type — default to feature when uncertain
  • Brief description — what the branch is for

If the user mentions a ticket or issue number, include it in the description (e.g., feature/issue-123-add-oauth).

Step 2 — Validate the Name

Check the assembled name against the Naming Rules above. If any rule fails, fix it:

  • Lowercase everything
  • Replace underscores and spaces with hyphens
  • Collapse consecutive hyphens
  • Strip leading/trailing hyphens

Step 3 — Detect the Base Branch

Different repos use different trunk branches. Detect which one this repo uses:

# Prefer the remote's default branch
git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||'

If that returns nothing, check which trunk branch exists locally (priority order: develop, main, master):

for b in develop main master; do
  git show-ref --verify --quiet "refs/heads/$b" && echo "$b" && break
done

Step 4 — Create and Checkout

git checkout <base>
git pull origin <base>
git checkout -b <type>/<description>

Step 5 — Confirm

Tell the user:

  • The branch name that was created
  • That they are now on the new branch
  • Remind them: git push -u origin <branch-name> when ready

Relationship with Conventional Commits

Conventional Branch complements Conventional Commits:

Conventional Branch Typical Conventional Commit
feature/add-login feat: add login page
bugfix/fix-header fix: header overflow on mobile
chore/update-deps chore: bump lodash to 5.0
release/v1.2.0 chore: release v1.2.0

Align the branch type with commit types where possible (e.g., feature/* branches with feat: commits).

자주 묻는 질문

Git 브랜치란 무엇인가요?

새로운 아이디어나 수정을 기존 버전에 영향을 주지 않고 작업할 수 있는 프로젝트의 복사본이라고 생각하면 됩니다. 나중에 변경 사항을 다시 합칠 수 있습니다.

브랜치 이름이 왜 중요한가요?

표준화된 이름은 여러분과 팀이 그 브랜치에서 무엇을 하는지 빠르게 이해하도록 도와, 작업을 더 체계적으로 만들고 따라가기 쉽게 해 줍니다.

브랜치 유형에는 무엇이 있나요?

흔한 유형으로는 ‘feature’(새 기능), ‘bugfix’(버그 수정), ‘hotfix’(긴급 수정), ‘release’(버전 준비), ‘chore’(기타 작업)가 있습니다.

상세 정보

작성자의 원본 설명

Create Git branches following the Conventional Branch specification (feature/, bugfix/, hotfix/, release/, chore/). Use when creating a new branch, naming a branch, or checking whether a branch name complies with the spec.

repo: github/awesome-copilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬