Skip to content

🌳 Git Branch, Commmit μ»¨λ²€μ…˜

DongRyeong Lee edited this page Dec 13, 2023 · 1 revision

Branch 관리 μ „λž΅

image

main # μΆœμ‹œ κ°€λŠ₯ν•œ production μ½”λ“œλ₯Ό λͺ¨μ•„λ‘λŠ” branch
γ„΄ dev # κ°œλ°œμ„ μœ„ν•œ μ½”λ“œλ₯Ό λͺ¨μ•„λ‘λŠ” branch
	γ„΄ feature # μƒˆλ‘œμš΄ κΈ°λŠ₯을 μΆ”κ°€ν•˜κΈ° μœ„ν•œ branch
	γ„΄ fix # 버그λ₯Ό 고치기 μœ„ν•œ branch
	γ„΄ hotfix # 배포 ν›„ κΈ΄κΈ‰ν•œ 버그 μˆ˜μ •μ„ μœ„ν•œ branch
	γ„΄ refactor # μƒˆλ‘œμš΄ κΈ°λŠ₯μ΄λ‚˜ 버그 μˆ˜μ • 없이 ν˜„μž¬ κ΅¬ν˜„μ„ κ°œμ„ ν•˜κΈ° μœ„ν•œ branch
  • main: μΆœμ‹œ κ°€λŠ₯ν•œ production μ½”λ“œλ₯Ό λͺ¨μ•„λ‘λŠ” branch
  • dev: κ°œλ°œμ„ μœ„ν•œ μ½”λ“œλ₯Ό λͺ¨μ•„λ‘λŠ” branch

Branch Naming μ»¨λ²€μ…˜

μš©λ„μ— 맞게 branchλͺ… μ•žμ— μ•„λž˜μ˜ type을 μž‘μ„±ν•©λ‹ˆλ‹€. type λ’€μ—λŠ” branchλ₯Ό μƒμ„±ν•œ λ‚ μ§œ 6자리λ₯Ό 숫자둜 κΈ°μž…ν•˜κ³ , - 둜 κ΅¬λΆ„ν•˜μ—¬ λͺ…λ Ήλ¬Έ(ν˜„μž¬μ‹œμ œ)으둜 branch μž‘μ—… λ‚΄μš©μ„ κ°„λž΅ν•˜κ²Œ μž‘μ„±ν•©λ‹ˆλ‹€.

/*브랜치 νƒ€μž…*/
feature: μƒˆλ‘œμš΄ κΈ°λŠ₯을 μΆ”κ°€ν•˜κΈ° μœ„ν•œ branch
fix: 버그λ₯Ό 고치기 μœ„ν•œ branch
refactor: μƒˆλ‘œμš΄ κΈ°λŠ₯μ΄λ‚˜ 버그 μˆ˜μ • 없이 ν˜„μž¬ κ΅¬ν˜„μ„ κ°œμ„ ν•˜κΈ° μœ„ν•œ branch

// [type]/[date]-[name]
// ex) feature/231106-add-login-page

Commit μ»¨λ²€μ…˜

  • λͺ¨λ“  컀밋 λ©”μ„Έμ§€λŠ” λͺ…λ Ήλ¬Έ (ν˜„μž¬μ‹œμ œ) λ₯Ό μ‚¬μš©ν•˜μ—¬ μž‘μ„±ν•©λ‹ˆλ‹€.
  • λͺ¨λ“  컀밋 메세지 μ•žμ—λŠ”Β type 을 μž‘μ„±ν•©λ‹ˆλ‹€.
  • λͺ¨λ“  컀밋 메세지 λ’€μ—λŠ” issue 번호λ₯Ό μž‘μ„±ν•©λ‹ˆλ‹€.
/*컀밋 νƒœκ·Έ νƒ€μž…*/
feat : μƒˆλ‘œμš΄ κΈ°λŠ₯을 μΆ”κ°€ν•œ 경우
fix : 버그λ₯Ό 고친 경우
design : CSS λ“± μ‚¬μš©μž UI λ””μžμΈμ„ λ³€κ²½ν•œ 경우
refactor : ν”„λ‘œλ•μ…˜ μ½”λ“œ λ¦¬νŒ©ν† λ§μ˜ 경우 (μƒˆλ‘œμš΄ κΈ°λŠ₯μ΄λ‚˜ 버그 μˆ˜μ • 없이 ν˜„μž¬ κ΅¬ν˜„μ„ κ°œμ„ )
docs : λ¬Έμ„œλ₯Ό μˆ˜μ •ν•œ 경우
comment : ν•„μš”ν•œ 주석 μΆ”κ°€ 및 λ³€κ²½μ˜ 경우
chore : μœ„μ˜ κ²½μš°μ— ν¬ν•¨λ˜μ§€ μ•ŠλŠ” 경우

/*
[type]: [commit message] #[issue number]

[detail]
*/

/*
feat: 둜그인 UI μž‘μ—… #3

컀밋에 λŒ€ν•œ μžμ„Έν•œ λ‚΄μš© μž…λ ₯
*/
Clone this wiki locally