MSA 9์ผ์ฐจ - ๐ŸผGit-Flow ์ดํ•ด ๋ฐ ์‹ค์Šต

Kim Hyen Suยท2023๋…„ 10์›” 19์ผ
0
post-custom-banner

Git-flow

๊ตฌ์„ฑ์› ๋ณ„๋กœ ๋ธŒ๋ Œ์น˜๋ฅผ ๋งŒ๋“ค์–ด์„œ ํ”„๋กœ์ ํŠธ ์ง„ํ–‰

์ „๋žต์„ ์งœ๋Š” ์ด์œ ? Conflict๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•จ

Git-Flow๋ฅผ ์‚ฌ์šฉํ•œ ์ด์œ  : ๊ฐœ๋ฐœ ์ธ์›์ด ๋งŽ์•„์ ธ์„œ ์ด๋ฅผ ํšจ์œจ์ ์œผ๋กœ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•จ

Git-flow ์ „๋žต

master(main) - ์ œํ’ˆ์œผ๋กœ ์ถœ์‹œ๋  ์ˆ˜ ์žˆ๋Š” ๋ธŒ๋ Œ์น˜

develop - ๋‹ค์Œ์œผ๋กœ ์ถœ์‹œํ•  ๋ฒ„์ „์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ธŒ๋ Œ์น˜

feature - ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•˜๋Š” ๋ธŒ๋žœ์น˜(issues ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉ)

pull request ๊ธฐ๋Šฅ์œผ๋กœ ๊ด€๋ฆฌ - ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•จ

  1. dev branch -> issues ํƒญ์— ์ถ”๊ฐ€
  2. issues ํƒญ์— ๋ฏธ๋ฆฌ ์ •ํ•œ To-Do-List๋ฅผ ์ถ”๊ฐ€(Zira, Splint)
  3. ํ˜„์žฌ dev ๋ธŒ๋ Œ์น˜๋ฅผ ๊ธฐ์ค€ feature ๋ธŒ๋ Œ์น˜๋ฅผ ๋”ฐ์˜จ๋‹ค
  4. ์ž‘์—… ์™„๋ฃŒ ํ›„ pull Request๋ฅผ ์š”์ฒญํ•จ.
  5. pull Request ๋œ ์ฝ”๋“œ์— ๋Œ€ํ•œ ์ฝ”๋“œ ๋ฆฌ๋ทฐํ•จ.
  6. ๋ฆฌ๋ทฐ๊ฐ€ ๋๋‚˜๋ฉด, dev์— ํ•ฉ์นจ
  7. issues ํƒญ์„ closeํ•œ ๋’ค ํ•ด๋‹น feature ๋ธŒ๋ Œ์น˜๋ฅผ ์‚ญ์ œ

์ถ”๊ฐ€๋กœ, ๋ธŒ๋ Œ์น˜ ๋ณดํ˜ธ ์ •์ฑ…์„ ํ†ตํ•ด master(main)์— push ๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€

Git-flow ํ…Œ์ŠคํŠธ

๊ฐ€์ƒ ์—ญํ•  : Controller ์ฝ”๋”ฉ

checkout : ๋ธŒ๋ Œ์น˜ ๊ฐ„ ์ด๋™ | ์ปค๋ฐ‹ ๋‚ด์—ญ ๊ฐ„ ์ด๋™

  • ex) git checkout -b ๋ธŒ๋ Œ์น˜๋ช…, git checkout ์ปค๋ฐ‹id

git -help : ๊นƒ ๊ด€๋ จ ๋ช…๋ น์–ด ํ™•์ธ

๐Ÿ˜ƒํ˜‘์—… ์‹œ ๊นƒํ—™ ์‚ฌ์šฉ ๊ณผ์ •

  1. gitHub์— ์ž‘์—…ํ•  ์ด์Šˆ ์ƒ์„ฑ(#๋ฒˆํ˜ธ)
  2. ๋กœ์ปฌ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์—์„œ develop ๋ธŒ๋ Œ์น˜ pull
  3. feature#๋ฒˆํ˜ธ ๋ธŒ๋ Œ์น˜ ์ƒ์„ฑ
  4. ์ด์Šˆ ๊ด€๋ จ ๋‚ด์šฉ ์ฝ”๋“œ ์ˆ˜์ •
  5. add - commit - push
  6. feature#๋ฒˆํ˜ธ -> develop ๋กœ pull request ์ƒ์„ฑ
  7. ์ฝ”๋“œ ๋ฆฌ๋ทฐ
  8. develop ๋ธŒ๋ Œ์น˜์— merge ํ›„ pull request close
  9. ์ด์Šˆ์— ์ˆ˜์ •ํ•œ ๋‚ด์šฉ ๊ฐ„๋žตํžˆ ์ ์€ ๋’ค close
  10. feature# ๋ธŒ๋ Œ์น˜ ์‚ญ์ œ
  11. ์ด ํ›„ ์ž‘์—…์€ ๋‹ค๋ฅธ ์ด์Šˆ ์ƒ์„ฑ ๋ฐ develop ๋ธŒ๋ Œ์น˜ pullํ•œ ๋’ค ์ž‘์—… ์žฌ๊ฐœ

๐ŸŒŸ์‹ค์Šต

๊นƒ ํ”Œ๋กœ์šฐ ํ…Œ์ŠคํŠธ

profile
๋ฐฑ์—”๋“œ ์„œ๋ฒ„ ์—”์ง€๋‹ˆ์–ด
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€