Skip to content

Git Convention

Soyeon Choe edited this page Jul 19, 2024 · 1 revision

๐Ÿ“„ Git Convention

Branch ์ •์ฑ…

๋ธŒ๋žœ์น˜๋ช… ์—ญํ•  ๊ทœ์น™
main ๋ฐฐํฌ / ์ฃผ์š” ํ•ญ์ƒ ๋ฐฐํฌ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ๋Œ์•„๊ฐ€๋Š” ์ƒํƒœ๋กœ ์œ ์ง€๋˜๋Š” ๋ธŒ๋žœ์น˜.
๋‹จ์ผ ๋ธŒ๋žœ์น˜์ด๋ฉฐ ์‚ญ์ œํ•˜์ง€ ์•Š๋Š”๋‹ค.
develop ๊ฐœ๋ฐœ ๊ธฐ๋Šฅ(feature)์ด ๋ชจ์ด๋ฉฐ QA / QC๋ฅผ ํ•˜๋Š” ๋ธŒ๋žœ์น˜.
๋‹จ์ผ ๋ธŒ๋žœ์น˜์ด๋ฉฐ ์‚ญ์ œํ•˜์ง€ ์•Š๋Š”๋‹ค.
๋ฌธ์ œ๊ฐ€ ์—†์œผ๋ฉด main ๋ธŒ๋žœ์น˜๋กœ ๋ฐฐํฌํ•œ๋‹ค.
feature ๊ธฐ๋Šฅ ๋‹จ์œ„ ๊ฐœ๋ฐœ ๊ธฐ๋Šฅ ๋ณ„ ๊ฐœ๋ฐœ์ด ์ง„ํ–‰๋˜๋Š” ๋ธŒ๋žœ์น˜.
๊ธฐ๋Šฅ ๊ฐœ๋ฐœ์ด ์™„๋ฃŒ๋˜๋ฉด review ์ดํ›„ develop์œผ๋กœ squash merge ๋œ๋‹ค.
merge ๋œ ํ›„์— ํ•ด๋‹น feature ๋ธŒ๋žœ์น˜๋Š” ์‚ญ์ œ๋œ๋‹ค.
ex) feature/#(issue number)
hotfix ๊ธด๊ธ‰ ์ด์Šˆ ์ฒ˜๋ฆฌ ๋ฐฐํฌํ™˜๊ฒฝ(main branch)์—์„œ ๊ธ‰ํ•œ ์ด์Šˆ๊ฐ€ ์ƒ๊ฒผ์„ ๋•Œ ์ƒ๊ธฐ๋Š” ๋ธŒ๋žœ์น˜.
main์—์„œ ๋ถ„๊ธฐํ•˜๋ฉฐ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐ ํ›„ main, develop์— ๋ฐ”๋กœ merge ํ•œ๋‹ค.
ex) hotfix/#(issue number)

Branch ์ด๋ฆ„ ์ปจ๋ฒค์…˜

  • ์ปค๋ฐ‹ ์ปจ๋ฒค์…˜/#์ด์Šˆ๋ฒˆํ˜ธ
  • ex) feature/#7

Commit ์ปจ๋ฒค์…˜

name description
feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€
์ด๋•Œ, markup ๋˜ํ•œ ํฌํ•จ๋œ๋‹ค.
style ์ฝ”๋“œ ์Šคํƒ€์ผ ์ˆ˜์ •
design css ์ˆ˜์ •
refactor ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง
fix ๋ฒ„๊ทธ ์ˆ˜์ •
chore ๋นŒ๋“œ ์—…๋ฌด ์ˆ˜์ •, ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ € ์ˆ˜์ • ๋“ฑ ์žก์ผ
docs ๊ฐœ๋ฐœ๋ฌธ์„œ ๊ด€๋ จ (README)
test ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ถ”๊ฐ€ ๋ฐ ์ˆ˜์ •
rename ํŒŒ์ผ ํ˜น์€ ํด๋”๋ช…์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์˜ฎ๊ธฐ๋Š” ์ž‘์—…
remove ํŒŒ์ผ ์‚ญ์ œ

Commit ๋ฉ”์„ธ์ง€ ํฌ๋ฉง

  • ์ปค๋ฐ‹ ์ปจ๋ฒค์…˜ : ๋‚ด์šฉ
  • ex) feat: drop down ๊ธฐ๋Šฅ ๊ตฌํ˜„