Skip to content

Commit Message and Branch Convention

Seungmin edited this page Oct 24, 2022 · 3 revisions

Commit message Convention

type: subject
body
footer
  1. Commit Type
Type ์˜๋ฏธ
feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ
fix ๋ฒ„๊ทธ ์ˆ˜์ •
refactor ๋ฆฌํŒฉํ† ๋ง
style ์Šคํƒ€์ผ
docs ๋ฌธ์„œ
test ํ…Œ์ŠคํŠธ
chore ๊ธฐํƒ€ ๋ณ€๊ฒฝ์‚ฌํ•ญ
  1. Subject
  • ์ œ๋ชฉ์€ ๋ช…๋ น์–ด๋กœ ์ž‘์„ฑํ•œ๋‹ค.
  • ๋งˆ์นจํ‘œ๋ฅผ ๋ถ™์ด์ง€ ์•Š๋Š”๋‹ค.
  • ํ•œ๊ธ€ ๋ฐ ์˜์–ด ๋ชจ๋‘ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋‹ค.
  1. Body (์„ ํƒ)
  • ๋ถ€์—ฐ ์„ค๋ช…์ด๋‚˜ ์ปค๋ฐ‹์˜ ์ด์œ ๋ฅผ ์ž‘์„ฑํ•œ๋‹ค.
  1. Footer (์„ ํƒ)
  • ์ฃผ๋กœ ์ด์Šˆ๋ฒˆํ˜ธ๋ฅผ ๋‚จ๊ธด๋‹ค.

ex) Issue: #00, Resolves: #00, See Also: #00, etc

Commit Message Convention ์‚ฌ์šฉ ์ด์œ 

๊ฐœ๋ฐœ์ž ๊ฐ„ ํ˜‘์—… ์‹œ์— ์ž˜ ์ž‘์„ฑ๋œ Commit Message ๋Š” ๊ต‰์žฅํžˆ ์œ ์ตํ•˜๋‹ค.

Commit Log ์˜ ๊ฐ€๋…์„ฑ์„ ๋†’์—ฌ์ฃผ๊ณ , ํ˜‘์—…๊ณผ ๋ฆฌ๋ทฐ ํ”„๋กœ์„ธ์Šค์— ๋„์›€์„ ์ฃผ๋ฉฐ, ์œ ์ง€๋ณด์ˆ˜๋ฅผ ์กฐ๊ธˆ ๋” ์šฉ์ดํ•˜๊ฒŒ ๋งŒ๋“ค์–ด ์ค€๋‹ค.

์ข‹์€ Commit Message ์— ์ •๋‹ต์€ ์—†๊ณ , ๊ธฐ์ค€ ๋˜ํ•œ ๋ชจ๋‘๊ฐ€ ๋‹ค๋ฅด์ง€๋งŒ ์•ฝ์†์„ ์ •ํ•ด์„œ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์€ ์ข‹์€ ํšจ๊ณผ๋ฅผ ๊ฐ€์ ธ์˜ฌ ๊ฒƒ์ด๋ผ ์ƒ๊ฐ์ด ๋œ๋‹ค.

Git Branch Message Convention

  • master : ์ œํ’ˆ์œผ๋กœ ์ถœ์‹œ๋  ์ˆ˜ ์žˆ๋Š” ๋ธŒ๋žœ์น˜
  • develop: ๋‹ค์Œ ์ถœ์‹œ ๋ฒ„์ „์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ธŒ๋žœ์น˜
  • feature: ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ธŒ๋žœ์น˜

์Ÿˆ๋‹ˆ ์•ˆ๋“œ๋กœ์ด๋“œ์—์„œ๋Š” develop ๋ธŒ๋žœ์น˜๋ฅผ Default๋กœ ํ•˜๊ณ  ์•ฑ์žผ ๊ธฐ๊ฐ„์—๋Š” feature/๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.