๋ฐ˜์‘ํ˜•

์ง€๋‚œ ํฌ์ŠคํŒ…์—์„œ๋Š” ๊นƒ์˜ ์šฉ์–ด์™€ ๋น„์ฃผ์–ผ ์ŠคํŠœ๋””์˜ค์—์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€ ์†Œ๊ฐœ๋ฅผ ํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค.

[Git] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ๊นƒ(Git) ์ดํ•ดํ•˜๊ธฐ

[Git] Visual Studio์—์„œ ๊นƒ ๋žฉ(GitLab) ์‚ฌ์šฉํ•˜๊ธฐ

[Git] Visual Studio์—์„œ ๊นƒ ๋žฉ(GitLab) ์‚ฌ์šฉ์„ ์œ„ํ•œ ์ค€๋น„

์ด์ œ ๊นƒ์ด ๋ฌด์—‡์ด๊ณ  ๋ถ„๊ธฐ๊ฐ€ ๋ฌด์—‡์ธ์ง€, ๋น„์ฃผ์–ผ ์ŠคํŠœ๋””์˜ค์—์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€๋Š” ์ตํ˜”๋Š”๋ฐ์š”. ๋ถ„๊ธฐ๋Š” ์–ด๋–ป๊ฒŒ ๋งŒ๋“ค์–ด์•ผ ํ• ๊นŒ์š”? ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ž‘์—… ์ค‘ ๋ณ€์ˆ˜ ๋ช… ์ง“๊ธฐ๋„ ๊ณจ์น˜ ์•„ํ”ˆ๋ฐ ๋ถ„๊ธฐ๋Š” ์ด๋ฆ„์„ ์–ด๋–ป๊ฒŒ ์ง“๊ณ  ์–ด๋–ป๊ฒŒ ์šด์˜ํ•ด ๋‚˜๊ฐ€์•ผ ํ• ๊นŒ์š”? ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” ์ด๋Ÿฐ ๋ถ„๊ธฐ ๋ชจ๋ธ ์ƒ์„ฑ์— ๊ด€ํ•œ ์ „๋žต ๋ฐ ๊ด€๋ฆฌ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์†Œ๊ฐœํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค.

์ฐธ๊ณ ๋กœ ๋ณธ๋ฌธ์˜ ๋‚ด์šฉ์€ 'Vincent Driessen'์ด ์ž‘์„ฑํ•œ 'A successful Git branching model'์„ ์ฐธ๊ณ ํ•˜์—ฌ ํ•„์š”ํ•œ ๋‚ด์šฉ๋งŒ ์š”์•ฝํ–ˆ์Šต๋‹ˆ๋‹ค. ์›์ž‘์ž์—๊ฒŒ ํ—ˆ๋ฝ์„ ๋ฐ›์€ ์ ๋„ ์•Œ๋ ค๋“œ๋ฆฝ๋‹ˆ๋‹ค.

Branching Model

์™œ ๊นƒ์ธ๊ฐ€(Why git)?

์ค‘์•™ ์ง‘์ค‘์‹ ์†Œ์Šค ์ฝ”๋“œ ์ œ์–ด ์‹œ์Šคํ…œ(Centralized source code control system)๊ณผ ๋น„๊ตํ•˜์—ฌ Git์˜ ์žฅ, ๋‹จ์ ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.

๋งํฌ: https://git.wiki.kernel.org/index.php/GitSvnComparsion 

 

GitSvnComparison - Git SCM Wiki

Note: This page is currently a work in progress. It started out as a private email to someone who currently uses Subversion. I decided to make it available and try to extend it further. I'll remove this comment when the page is improved.  :) -- Shawn Pearc

git.wiki.kernel.org

์—ฌ๊ธฐ์—๋Š” ์•„์ง๋„ ๋งŽ์€ ๋…ผ์Ÿ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ์ž๋กœ์„œ, ์ €๋Š” ์˜ค๋Š˜๋‚  ๋‹ค๋ฅธ ๋„๊ตฌ๋ณด๋‹ค Git์„ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค. Git์€ ๊ฐœ๋ฐœ์ž๋“ค์ด ๋ณ‘ํ•ฉ(merging)๊ณผ ๋ธŒ๋žœ์นญ(branching)์— ๋Œ€ํ•ด ์ƒ๊ฐํ•˜๋Š” ๋ฐฉ์‹์„ ๋ฐ”๊พธ์–ด ๋†“์•˜์Šต๋‹ˆ๋‹ค. ์ œ๊ฐ€ ์ด์ „์— ์‚ฌ์šฉํ–ˆ๋˜ ์ „ํ†ต์ ์ธ CVS/Subversion์—์„œ ๋ณ‘ํ•ฉ(merging)๊ณผ ๋ถ„๊ธฐ(branching)๋Š” ํ•ญ์ƒ ์•ฝ๊ฐ„ ๋ฌด์„ญ๊ณ (๋ณ‘ํ•ฉ ์ถฉ๋Œ ๋•Œ๋ฌธ์—), ์ด ์ž‘์—…์€ ๊ฐ€๋”์”ฉ๋งŒ ์ˆ˜ํ–‰ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

ํ•˜์ง€๋งŒ Git์„ ์‚ฌ์šฉํ•˜๋ฉด ์ด๋Ÿฌํ•œ ํ–‰๋™๋“ค์˜ ์ž‘์—…์€ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๋ฉฐ, ์ผ์ƒ์ ์ธ ์ž‘์—… ํ๋ฆ„(workflow)์˜ ํ•ต์‹ฌ ๋ถ€๋ถ„ ์ค‘ ํ•˜๋‚˜๋กœ ๊ฐ„์ฃผ๋ฉ๋‹ˆ๋‹ค. ์ฆ‰, Git์—์„œ์˜ ๋ณ‘ํ•ฉ๊ณผ ๋ถ„๊ธฐ๋Š” ๊ต‰์žฅํžˆ ์ค‘์š”ํ•˜๊ณ  ์ž์ฃผ ์‚ฌ์šฉ๋œ๋‹ค๋Š” ์˜๋ฏธ์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, CVS/Subversion ๊ณ ๊ธ‰ ์‚ฌ์šฉ์ž ์šฉ ์„œ์ ์—์„œ ๋ถ„๊ธฐ์™€ ๋ณ‘ํ•ฉ์€ ๋’ท ๋ถ€๋ถ„์— ์†Œ๊ฐœ๋˜์ง€๋งŒ, ๋ชจ๋“  Git ์„œ์ ์—์„œ๋Š” ์•ž์žฅ์—์„œ ๋‹ค๋ฃจ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋งŒํผ Git์—์„œ์˜ ๋ณ‘ํ•ฉ๊ณผ ๋ถ„๊ธฐ๋Š” ๊ฐ„๋‹จํ•˜๊ณ  ์‰ฝ๊ฒŒ ์‚ฌ์šฉ๋œ๋‹ค๋Š” ์–˜๊ธฐ๊ฒ ์ฃ ?

๋‹จ์ˆœํ•˜๊ณ  ๋ฐ˜๋ณต์ ์ธ ํŠน์„ฑ์„ ๊ฐ–๊ธฐ ๋•Œ๋ฌธ์—, ๋ถ„๊ธฐ์™€ ๋ณ‘ํ•ฉ์€ ๋” ์ด์ƒ ๋‘๋ ค์›Œํ•  ๋Œ€์ƒ์ด ์•„๋‹™๋‹ˆ๋‹ค. ๋ฒ„์ „ ๊ด€๋ฆฌ ๋„๊ตฌ๋Š” ๋‹ค๋ฅธ ๋ฌด์—‡๋ณด๋‹ค๋„ ๋ถ„๊ธฐ์™€ ๋ณ‘ํ•ฉ์— ๋„์›€์ด ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๊นƒ์— ๋Œ€ํ•œ ์–˜๊ธฐ๋Š” ์ถฉ๋ถ„ํ•ฉ๋‹ˆ๋‹ค. ์ด์ œ ๊ฐœ๋ฐœ ๋ชจ๋ธ(development model)์— ๋Œ€ํ•ด ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์„œ ์†Œ๊ฐœํ•  ๋ชจ๋ธ์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ๋ชจ๋“  ํŒ€ ๊ตฌ์„ฑ์›์ด ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ํ”„๋กœ์„ธ์Šค์— ๋”ฐ๋ผ์•ผ ํ•˜๋Š” ์ผ๋ จ์˜ ์ ˆ์ฐจ์— ์ง€๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋ถ„์‚ฐ๋˜์—ˆ์ง€๋งŒ, ์ค‘์•™ ์ง‘์ค‘์‹(Decentralized but centralized)

์ด ๋ถ„๊ธฐ ๋ชจ๋ธ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ์ €์žฅ์†Œ ์„ค์ •์€ ์ค‘์•™ "truth" ์ €์žฅ์†Œ์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ์ด ์ €์žฅ์†Œ๋Š” ์ค‘์•™์œผ๋กœ ๊ฐ„์ฃผ๋ฉ๋‹ˆ๋‹ค(Git์€ DVCS์ด๋ฏ€๋กœ ๊ธฐ์ˆ ์ ์ธ ์ˆ˜์ค€์—์„œ ์ค‘์•™ repo์™€ ๊ฐ™์€ ๊ฒƒ์€ ์—†์Šต๋‹ˆ๋‹ค). ์ด ์ด๋ฆ„์€ ๋ชจ๋“  Git  ์‚ฌ์šฉ์ž์—๊ฒŒ ์นœ์ˆ™ํ•œ ์ด๋ฆ„์ด๋ฏ€๋กœ ์ด ์ €์žฅ์†Œ๋ฅผ ์›์ (origin)์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.

Decentralized but centralized

๊ฐ ๊ฐœ๋ฐœ์ž๋Š” origin์— pull๊ณผ push๋ฅผ ํ•ฉ๋‹ˆ๋‹ค. ์ค‘์•™ ์ง‘์ค‘์‹ push-pull ๊ด€๊ณ„์™ธ์—๋„, ๊ฐ ๊ฐœ๋ฐœ์ž๋Š” ๋‹ค๋ฅธ ํ”ผ์–ด(peer)์—์„œ sub team์„ ๊ตฌ์„ฑํ•˜๋„๋ก ๋ณ€๊ฒฝ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์ง„ํ–‰ ์ค‘์ธ ์ž‘์—…์„ origin์œผ๋กœ push ํ•˜๊ธฐ ์ „์—, ํฐ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์œ„ํ•ด ๋‘ ๋ช… ์ด์ƒ์˜ ๊ฐœ๋ฐœ์ž์™€ ํ•จ๊ป˜ ์ž‘์—…ํ•˜๋Š”๋ฐ ์œ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์œ„ ๊ทธ๋ฆผ์—์„œ, Alice์™€ Bob, Alice์™€ David ๊ทธ๋ฆฌ๊ณ  Clair์™€ David๋Š” ํ•˜์œ„ํŒ€์ž…๋‹ˆ๋‹ค. ์ฆ‰, David๊ฐ€ ์ž‘์—… ์ค‘์ธ ๋‚ด์šฉ์„ ์ฆ‰์‹œ origin์— push ํ•  ์ˆ˜๋„ ์žˆ๊ณ , Clair์™€ ํ•จ๊ป˜ ์ž‘์—…ํ•œ ์ดํ›„ origin์— push ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋ฉ”์ธ ๋ถ„๊ธฐ(The main branches)

ํ•ต์‹ฌ์ ์œผ๋กœ, ๊ฐœ๋ฐœ ๋ชจ๋ธ(development model)์€ ๊ธฐ์กด์˜ ๋ชจ๋ธ์—์„œ ํฌ๊ฒŒ ์˜๊ฐ์„ ๋ฐ›์Šต๋‹ˆ๋‹ค. ์ค‘์•™ ์ €์žฅ์†Œ๋Š” ๋‘ ๊ฐœ์˜ ์ฃผ์š” ๋ถ„๊ธฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์œผ๋ฉฐ ์ˆ˜๋ช…์€ ๋ฌดํ•œํ•ฉ๋‹ˆ๋‹ค. ๋ฉ”์ธ ๋ถ„๊ธฐ๋กœ๋Š” master์™€ develop ๋ถ„๊ธฐ์ž…๋‹ˆ๋‹ค. ์ˆ˜๋ช…์ด ๋ฌดํ•œํ•˜๋‹ค๋Š” ์˜๋ฏธ๋Š”, ๋ฒ„๊ทธ ์ˆ˜์ •์ด๋‚˜ ๊ธฐ๋Šฅ ํ™•์žฅ์„ ์œ„ํ•œ ๋ถ„๊ธฐ๋Š” ์ž‘์—…์ด ๋๋‚˜๋ฉด ์‚ฌ๋ผ์ง€์ง€๋งŒ, ์ด ๋ฉ”์ธ ๋ถ„๊ธฐ๋“ค์€ ์œ ์ง€ ๋œ๋‹ค๋Š” ์˜๋ฏธ์ž…๋‹ˆ๋‹ค.

Main branches

origin์—์„œ master ๋ถ„๊ธฐ๋Š” ๋ชจ๋“  Git ์‚ฌ์šฉ์ž์—๊ฒŒ ์นœ์ˆ™ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. master ๋ถ„๊ธฐ์™€ ๋ณ‘๋ ฌ๋กœ, develop์ด๋ผ ๋ถˆ๋ฆฌ๋Š” ๋‹ค๋ฅธ ๋ถ„๊ธฐ๊ฐ€ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. origin/master๋ฅผ HEAD์˜ ์†Œ์Šค ์ฝ”๋“œ๊ฐ€ ํ•ญ์ƒ ์ƒ์‚ฐ ์ค€๋น„(production-ready) ์ƒํƒœ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์ฃผ์š” ๋ถ„๊ธฐ์ ์œผ๋กœ ๊ฐ„์ฃผํ•ฉ๋‹ˆ๋‹ค. origin/develop์€ HEAD์˜ ์†Œ์Šค ์ฝ”๋“œ๊ฐ€ ํ•ญ์ƒ ๋‹ค์Œ ๋ฆด๋ฆฌ์Šค์˜ ์ตœ์‹  ๊ฐœ๋ฐœ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ•˜๊ณ  ์žˆ๋Š” ์ฃผ์š” ๋ถ„๊ธฐ์ ์œผ๋กœ ๊ฐ„์ฃผํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ถ€๋Š” ์ด๊ฒƒ์„ "integration branch"๋ผ๊ณ  ๋ถ€๋ฅผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. develop ๋ถ„๊ธฐ์˜ ์†Œ์Šค ์ฝ”๋“œ๊ฐ€ ์•ˆ์ •์ ์ธ ์ง€์ ์— ๋„๋‹ฌํ•˜์—ฌ ๋ฐฐํฌํ•  ์ค€๋น„๊ฐ€ ๋˜๋ฉด, ๋ชจ๋“  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ master๋กœ ๋‹ค์‹œ ๋ณ‘ํ•ฉ(merge)ํ•œ ๋‹ค์Œ ๋ฆด๋ฆฌ์Šค ๋ฒˆํ˜ธ๋กœ ํƒœ๊ทธ๋ฅผ ์ง€์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด ์ž‘์—…์ด ์–ด๋–ป๊ฒŒ ์ˆ˜ํ–‰๋˜๋Š”์ง€ ์ž์„ธํžˆ ๋…ผ์˜ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ฒˆ์—ญ์ด ๋งค๋„๋Ÿฝ์ง€ ์•Š๋„ค์š”. ์ฆ‰, master๋Š” ์ œํ’ˆ์œผ๋กœ ์ถœ์‹œ๋  ์ˆ˜ ์žˆ๋Š”, ๋ฆด๋ฆฌ์ฆˆ ์ด๋ ฅ์„ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” ๋ถ„๊ธฐ์ž…๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  develop์€ ๋‹ค์Œ ๋ฆด๋ฆฌ์ฆˆ ๋ฒ„์ „์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ถ„๊ธฐ์ด๋ฉฐ, ๋ชจ๋“  ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ๊ณผ ๋ฒ„๊ทธ๊ฐ€ ์ˆ˜์ •๋œ ๋‚ด์šฉ์ด develop์œผ๋กœ ๋ณ‘ํ•ฉ๋˜๊ณ  ์ด๊ฒƒ์ด ์•ˆ์ •์ ์ธ ์ƒํƒœ๋ผ๋ฉด master์— ๋ณ‘ํ•ฉ๋ฉ๋‹ˆ๋‹ค.

๋‹ค์–‘ํ•œ ๋ถ„๊ธฐ๋“ค(Supporting branches)

๋ฉ”์ธ ๋ถ„๊ธฐ์ธ master์™€ develop์™ธ์—๋„ ๊ฐœ๋ฐœ ๋ชจ๋ธ์—๋Š” ๋‹ค์–‘ํ•œ ๋ถ„๊ธฐ๋ฅผ ๋ณ‘๋ ฌ์ ์œผ๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ํŒ€ ๊ตฌ์„ฑ์› ๊ฐ„์˜ ๋ณ‘๋ ฌ ๊ฐœ๋ฐœ, ๊ธฐ๋Šฅ ์ถ”์  ์šฉ์ด์„ฑ, ์ œํ’ˆ ๋ฆด๋ฆฌ์Šค ๋ฐ ์ œํ’ˆ ๋ฌธ์ œ๋ฅผ ์‹ ์†ํ•˜๊ฒŒ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋„๋ก ๋ง์ด์ฃ . ๋ฉ”์ธ ๋ถ„๊ธฐ์™€ ๋‹ฌ๋ฆฌ ์ด๋Ÿฌํ•œ ๋ถ„๊ธฐ๋“ค์€ ๊ฒฐ๊ตญ ์ œ๊ฑฐ๋  ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— ํ•ญ์ƒ ์ œํ•œ๋œ ์ˆ˜๋ช…์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

  • Feature branches
  • Release branches
  • Hotfix branches

๊ฐ ๋ถ„๊ธฐ๋“ค์€ ํŠน์ •ํ•œ ๋ชฉ์ ์„ ๊ฐ€์ง€๊ณ  ์žˆ์œผ๋ฉฐ ์–ด๋–ค ์ง€์ ์ด ์›๋ž˜ ์ง€์ ์ด ๋  ์ˆ˜ ์žˆ๊ณ , ์–ด๋–ค ์ง€์ ์ด ๋ณ‘ํ•ฉ ๋Œ€์ƒ์ด ๋˜์–ด์•ผ ํ•˜๋Š”์ง€์— ๋Œ€ํ•œ ์—„๊ฒฉํ•œ ๊ทœ์น™์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ž ์‹œ ํ›„์— ๋” ์ž์„ธํžˆ ๋‹ค๋ค„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๊ธฐ์ˆ ์  ๊ด€์ ์—์„œ ์ด๋Ÿฌํ•œ ์ง€์ ์ด "special"ํ•œ ๊ฒƒ์€ ๊ฒฐ์ฝ” ์•„๋‹™๋‹ˆ๋‹ค. ๋ถ„๊ธฐ ์œ ํ˜•์€ ์šฐ๋ฆฌ๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋”ฐ๋ผ ๋ถ„๋ฅ˜๋ฉ๋‹ˆ๋‹ค.

๊ธฐ๋Šฅ ๋ถ„๊ธฐ(Feature branches)

develop ๋ถ„๊ธฐ๋กœ๋ถ€ํ„ฐ ๋ถ„๊ธฐ๋˜๊ณ  develop์œผ๋กœ ๋ณ‘ํ•ฉ๋˜๋Š” ๋ถ„๊ธฐ๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•  ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

๋ถ„๊ธฐ ์ด๋ฆ„:
master, develop, release-*, or hotfix-* ์ด์™ธ
[feature/๊ตฌํ˜„ํ•  ๊ธฐ๋Šฅ ์š”์•ฝ]
์˜ˆ์‹œ) feature/roi

Feature branches

๊ธฐ๋Šฅ ๋ถ„๊ธฐ(topic ๋ถ„๊ธฐ๋ผ๊ณ ๋„ ๋ถˆ๋ฆฌ๋Š”)๋Š” ํ–ฅํ›„ ๋ฆด๋ฆฌ์Šค์— ๋Œ€ํ•œ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ์ด ์‹œ์ž‘ํ•  ๋•Œ, ์ด ๊ธฐ๋Šฅ์€ ํ†ตํ•ฉ๋  ๋Œ€์ƒ ๋ฆด๋ฆฌ์Šค๋Š” ๊ทธ ์‹œ์ ์—์„œ ์•Œ ์ˆ˜ ์—†๋Š” ๊ฒƒ์ผ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์˜๋ฏธ๋Š”, ๊ธฐ๋Šฅ ๋ถ„๊ธฐ์˜ ๋ณธ์งˆ์€ ๊ฐœ๋ฐœ ์ค‘์ธ ํ•œ ์กด์žฌํ•˜์ง€๋งŒ ๊ฒฐ๊ตญ ๋‹ค์‹œ ๋ณ‘ํ•ฉ๋˜๊ฑฐ๋‚˜(๊ณง ์ถœ์‹œ๋  ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด) ํ๊ธฐ(์‹ค๋ง์Šค๋Ÿฌ์šด ๊ฒฝ์šฐ)๋œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ธฐ๋Šฅ ๋ถ„๊ธฐ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ origin์ด ์•„๋‹Œ ๊ฐœ๋ฐœ ์ €์žฅ์†Œ์— ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.

์ถœ์‹œ ๋ถ„๊ธฐ(Release branches)

develop ๋ถ„๊ธฐ๋กœ๋ถ€ํ„ฐ ๋ถ„๊ธฐ๋˜๊ณ  develop๊ณผ master๋กœ ๋ณ‘ํ•ฉ๋ฉ๋‹ˆ๋‹ค.

๋ถ„๊ธฐ ์ด๋ฆ„:
release-*
์˜ˆ์‹œ) release-1.1

๋ฆด๋ฆฌ์ฆˆ ๋ถ„๊ธฐ๋Š” ์ƒˆ๋กœ์šด ์ œํ’ˆ ์ถœ์‹œ(production release)์˜ ์ค€๋น„๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์‚ฌ์†Œํ•œ ๋ฒ„๊ทธ ์ˆ˜์ •๊ณผ ๋ฉ”ํƒ€ ๋ฐ์ดํ„ฐ(๋ฒ„์ „ ๋„˜๋ฒ„, ๋นŒ๋“œ ๋‚ ์งœ ๋“ฑ) ๊ฐ™์€ ๊ฒƒ๋“ค์ž…๋‹ˆ๋‹ค. ์ด ๋ชจ๋“  ์ž‘์—…์„ Release ๋ถ„๊ธฐ์—์„œ ์ˆ˜ํ–‰ํ•จ์œผ๋กœ์จ develop ๋ถ„๊ธฐ๋Š” ๋‹ค์Œ ํฐ release์˜ ๊ธฐ๋Šฅ์„ ์ œ๊ณต๋ฐ›์„ ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

์ƒˆ๋กœ์šด ๋ฆด๋ฆฌ์ฆˆ ๋ถ„๊ธฐ๋ฅผ develop์—์„œ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์ค‘์š”ํ•œ ์ˆœ๊ฐ„์€ ๊ฐœ๋ฐœ์ด ์ƒˆ๋กœ์šด ๋ฆด๋ฆฌ์ฆˆ์˜ ์›ํ•˜๋Š” ์ƒํƒœ๋ฅผ ๋ฐ˜์˜ํ•  ๋•Œ ์ž…๋‹ˆ๋‹ค. ์ ์–ด๋„ ํ˜„์žฌ ์‹œ์ ์—์„œ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•ด ๊ตฌ์ถ•๋  ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ๋Œ€์ƒ์œผ๋กœ ํ•˜๋Š” ๋ชจ๋“  feature๋ฅผ ๋ณ‘ํ•ฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ฆด๋ฆฌ์ฆˆ ๋ธŒ๋žœ์น˜๊ฐ€ ์‹œ์ž‘๋  ๋•Œ ๊ณง ์ถœ์‹œ๋  ๋ฆด๋ฆฌ์ฆˆ์— ์ด๋ฒˆ ๋ฒ„์ „์ด ์•„๋‹Œ ๋ฒ„์ „ ๋ฒˆํ˜ธ๊ฐ€ ํ• ๋‹น๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋•Œ๊นŒ์ง€ develop ๋ธŒ๋žœ์น˜๋Š” ๋‹ค์Œ ๋ฆด๋ฆฌ์ฆˆ์— ๋Œ€ํ•œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ–ˆ์ง€๋งŒ ๋ฆด๋ฆฌ์ฆˆ ๋ธŒ๋žœ์น˜๊ฐ€ ์‹œ์ž‘๋  ๋•Œ๊นŒ์ง€ ๋‹ค์Œ ๋ฆด๋ฆฌ์ฆˆ๊ฐ€ ๊ฒฐ๊ตญ 0.3 ๋˜๋Š” 1.0์ด ๋ ์ง€ ํ™•์‹คํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ด ๊ฒฐ์ •์€ ๋ฆด๋ฆฌ์ฆˆ ๋ธŒ๋žœ์น˜ ์‹œ์ž‘ ์‹œ์ ์—์„œ ์ด๋ฃจ์–ด์ง€๋ฉฐ, ๋ฒ„์ „ ๋ฒˆํ˜ธ ์ถฉ๋Œ์— ๋Œ€ํ•œ ํ”„๋กœ์ ํŠธ ๊ทœ์น™์— ๋”ฐ๋ผ ์ˆ˜ํ–‰๋ฉ๋‹ˆ๋‹ค.

ํ•ซํ”ฝ์Šค ๋ถ„๊ธฐ(Hotfix branches)

master ๋ถ„๊ธฐ๋กœ๋ถ€ํ„ฐ ๋ถ„๊ธฐ๋˜๊ณ  develop๊ณผ master๋กœ ๋ณ‘ํ•ฉ๋ฉ๋‹ˆ๋‹ค.

๋ถ„๊ธฐ ์ด๋ฆ„:
hotfix-*
์˜ˆ์‹œ) hotfix-1.2

Hotfix branches

ํ•ซํ”ฝ์Šค ๋ถ„๊ธฐ๋Š” ๊ณ„ํš๋˜์ง€ ์•Š์•˜์ง€๋งŒ ์ƒˆ๋กœ์šด ์ƒ์‚ฐ ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ์ค€๋น„ํ•˜๊ธฐ ์œ„ํ•œ ๊ฒƒ์ด๋ผ๋Š” ์ ์—์„œ ๋ฆด๋ฆฌ์ฆˆ ๋ถ„๊ธฐ์™€ ๋งค์šฐ ๋น„์Šทํ•ฉ๋‹ˆ๋‹ค. ํ”„๋กœ๋•์…˜ ๋ฒ„์ „์—์„œ ๋ฒ„๊ทธ๋ฅผ ์ฆ‰์‹œ ํ•ด๊ฒฐํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ, ํ”„๋กœ๋•์…˜ ๋ฒ„์ „์„ ํ‘œ์‹œํ•˜๋Š” ๋งˆ์Šคํ„ฐ ๋ถ„๊ธฐ์˜ ํ•ด๋‹น ํƒœ๊ทธ์—์„œ ํ•ซํ”ฝ์Šค ๋ถ„๊ธฐ๋ฅผ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ฆ‰, ๋ฆด๋ฆฌ์ฆˆํ•œ ๋ฒ„์ „์—์„œ ๋ฒ„๊ทธ๊ฐ€ ๋ฐœ๊ฒฌ๋˜์–ด develop ๋ถ„๊ธฐ์—์„œ ์ˆ˜์ •ํ•˜๊ณ  ๋‹ค์‹œ ๋ฐฐํฌํ•˜๊ธฐ์—๋Š” ์‹œ๊ฐ„์ด ๋งŽ์ด ์†Œ์š”๋˜๊ธฐ ๋•Œ๋ฌธ์—, master ๋ถ„๊ธฐ์—์„œ ์ง์ ‘ hotfix ๋ถ„๊ธฐ๋ฅผ ๋งŒ๋“ค์–ด ์ˆ˜์ •ํ•˜๊ณ  master์— ๋ณ‘ํ•ฉํ•˜๊ณ  ๋‹ค์‹œ ๋ฆด๋ฆฌ์ฆˆํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ ์ค‘์— ๋ฐœ๊ฒฌ๋œ ๋ฒ„๊ทธ๋Š” ๋‹ค์Œ ๋ฆด๋ฆฌ์ฆˆ์—๋„ ๊ฐœ์„  ์‚ฌํ•ญ์ด ํฌํ•จ๋˜์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— develop์—๋„ ๋ณ‘ํ•ฉ๋˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋ฐ˜์‘ํ˜•