Skip to content

⚙️ Commit Convention

Chi Hyun Noh edited this page Sep 11, 2023 · 11 revisions

Template 🤙

<type>: <subject>  // => 제목
----------------------------- <한 줄 띄움 엔터>
<body>             // => 본문
----------------------------- <한 줄 띄움 엔터>
<footer>           // => 꼬리말
  • type : 아래 테이블을 이용해 의도를 명확하게 담을 것
  • subject : 최대 50글자 이내, 마침표는 사용 여부 알아서
  • body : 긴 설명시 작성한다. 어떻게 했는지가 아닌, 무엇을 왜 했는지 작성한다.
  • footer : issue tracker ID를 명시하고 싶은 경우 작성한다. (권장)

예시 🤙

image

Feat: Taing 메인(홈)페이지 초안
    
메인(홈)페이지(Home.jsx)를 구현하였습니다.
   
fixes: 추후 컴포넌트 분리 및 리팩토링으로 구조 변경 가능성 있음
Related to #7, #35

작성 가이드 🤙

  • 커밋과 동시에 작성 금지 git commit -m "message" X
    => git commitnvm 에서 메시지 작성!

  • 작업 중간에 develop 브랜치 업데이트 시 동기화 방법

    1. git stash
    2. git switch develop
    3. git pull upstream develop
    4. git switch <작업 branch>
    5. git stash pop
    6. git merge develop

Subject 🤙

제목은 최대 50글자까지 아래에 작성
ex) Feat: Add Key mapping

Body 🤙

본문은 아래에 작성

Footer 🤙

꼬릿말은 아래에 작성
ex) Github issue #23

--- COMMIT END --- 📚

타입 설명 예시
feat 새로운 기능 추가 Feat: Add Key mapping
fix 버그 수정 Fix: Handle null pointer exception
refactor 코드 리팩토링 Refactor: Improve code structure
markup 마크업 (HTML) 변경 Markup: Update index.html
design 사용자 UI 디자인 변경 Design: Update button styles
comment 필요한 주석 추가 및 변경 Comment: Add comments to explain logic
style 코드 형식, 세미콜론 추가 등 스타일 변경 Style: Format code according to style guide
docs 문서 수정 Docs: Update README with new instructions
test 테스트 코드 추가, 수정, 삭제 Test: Add unit tests for authentication
chore 빌드 스크립트 수정, 패키지 매니저 변경 등 Chore: Update dependencies
init 초기 생성 Init: Create new project
rename 파일 혹은 폴더명 수정 또는 이동 작업 Rename: Rename utils.py to helpers.py
remove 파일 삭제 Remove: Delete obsolete file
sync 팀원들과 동기화 Sync: Pull and Merge
setting 패키지 추가/변경, 공통 사항 세팅 등 Setting: Add .gitmessage.txt

꼬리말 (Optional) 🍸:

  • Fixes: 아직 해결되지 않은 이슈 수정 중일 때 사용
  • Resolves: 이슈 해결 시 사용
  • Ref: 참고할 이슈가 있을 때 사용
  • Related to: 해당 커밋과 관련된 이슈번호 (아직 해결되지 않은 경우)

예시 🍸: Fixes: #47 Related to: #32, #21

깃모지를 활용할 것
image

merge시 컨벤션 예시:
🙌 [merge] develop 브랜치 병합