Skip to content

git ์ „๋žต

J219_ํ™์ข…์šฐ edited this page Nov 5, 2021 · 14 revisions

Branch ์ „๋žต

  • ์•„๋ž˜์˜ 2๊ฐ€์ง€ ๊ทธ๋ฆผ ์ฐธ๊ณ (์ตœ์ดˆ 1, 2๋ฒˆ ์ง„ํ–‰ ํ›„ 3๋ฒˆ ๋ถ€ํ„ฐ ๋ฐ˜๋ณต)
  • ์ „๋žต ๊ทธ๋ฆผ(1) git ์ „๋žต ๊ทธ๋ฆผ(1)

  • ์ „๋žต ๊ทธ๋ฆผ(2) git ์ „๋žต ๊ทธ๋ฆผ(2)

  • ์ „๋žต ๊ด€๋ จ ๋กœ์ง ์„ค๋ช…

    1. origin Repository : main / dev ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ
    2. ์ตœ์ดˆ 1ํšŒ Local๋กœ dev ๋ธŒ๋žœ์น˜ clone ํ›„ directory ์ด๋™
      - (local) git clone -b dev xxx.git
      - cd REPO_NAME
    3. ๊ธฐ๋Šฅ๋ณ„ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ(feat/{example})
    4. ๊ฐœ์ธ๋ณ„ ์ž‘์—… ๋ธŒ๋žœ์น˜๋กœ ์ด๋™
      - git checkout feat/{example}
      - git checkout -b {example}/#?  (ํ•„์š” ์‹œ ์„ ํƒ ์‚ฌํ•ญ)
    5. Local ์ž‘์—… ๋ธŒ๋žœ์น˜ ์ฝ”๋“œ ์ˆ˜์ • ๋ฐ commit ์ง„ํ–‰
      - ({example/#??) git add && git commit
    6. Local ๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜(feat/{example})์— ๋‹จ์ˆœ merge
      - (feat/{example}) git merge {example}/#??
    7. Local ์ž‘์—… ๋ธŒ๋žœ์น˜๋ฅผ origin ๋Œ€์ƒ ๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜์— push
      - (feat/{example}) git push origin feat/{example}
      - ์ด ๋•Œ, Conflict ๋ฐœ์ƒ ์‹œ, rebase ํ›„ conflict ํ•ด์†Œ ์ดํ›„ push
         - (feat/{example}) git pull --rebase origin feat/{example} ์ง„ํ–‰ ํ›„ conflict ํ•ด์†Œ, commit, rebase --continue
    8. origin feat/{example} -> origin dev์œผ๋กœ PR
      - PR ๋ฆฌ๋ทฐ ๋ฐ Squash and Merge
      - Conflict ๋ฐœ์ƒ ์‹œ - (Local feat/{example}) git pull --rebase origin dev (conflict ํ•ด์†Œ ํ›„ ๋‹ค์‹œ Push && PR)
      - Conflict ๋ฏธ ๋ฐœ์ƒ ์‹œ - (Local feat/{example} -> origin feat/{example}) git push feat/{example} && PR
    9. ๋ฐฐํฌํŒ ๊ตฌ์„ฑ ์‹œ, origin dev -> origin main ์œผ๋กœ PR
      - create and merge์˜ ๊ฒฝ์šฐ origin main -> origin develop์œผ๋กœ fetch ํ•ด์ฃผ์–ด์•ผ ํ•จ
    10. Local ์ž‘์—… ๋ธŒ๋žœ์น˜ fetch and rebase
    - (Local dev branch) git pull --rebase origin dev
    11. ์‹ ๊ทœ ๊ธฐ๋Šฅ, 3๋ฒˆ ๋ถ€ํ„ฐ ๋ฐ˜๋ณต


PR Convention

Origin feat/{example} -> Origin dev PR (Squash and Merge)

  • PR ์ œ๋ชฉ: [ISSUE_TAG] Title
  • PR ๋‚ด์šฉ:
### ๐Ÿ”จ ์ž‘์—… ๋‚ด์šฉ ์„ค๋ช…

### ๐Ÿ“‘ ๊ตฌํ˜„ํ•œ ๋‚ด์šฉ
๋ญํ–ˆ๋Š”์ง€ ๋ชฉ๋กํ™” 

### ๐Ÿšง ์ฃผ์˜ ์‚ฌํ•ญ
๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๋ฉด์„œ ๋งŒ๋‚ฌ๋˜ ์–ด๋ ค์› ๋˜ ์ .

[### ์Šคํฌ๋ฆฐ ์ƒท]

[issue | close] #[ISSUE_NUMBER]

Origin dev -> Origin main PR (Create and Merge)

  • PR ์ œ๋ชฉ: [Deploy] dev -> main ๋ฐ˜์˜
  • PR ๋‚ด์šฉ:
### ๐Ÿ“‘ ๋ฐฐํฌ ๋Œ€์ƒ ๊ธฐ๋Šฅ ๋ชฉ๋ก


Issue Convention

  • ์ด์Šˆ ์ œ๋ชฉ: feat/{example} [์„ค๋ช…]
  • ์ด์Šˆ ๋‚ด์šฉ:
### ๐Ÿ”จ ๊ธฐ๋Šฅ ์„ค๋ช…
๊ธฐ๋Šฅ ์„ค๋ช…

### ๐Ÿ“‘ ๊ตฌํ˜„ํ•  ๋‚ด์šฉ
๋ชฉ๋กํ™” 

### ๐Ÿšง ์ฃผ์˜ ์‚ฌํ•ญ
๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•  ๋•Œ ์œ ์˜๊นŠ๊ฒŒ ์‚ดํŽด๋ณผ ์‚ฌํ•ญ

(### ์Šคํฌ๋ฆฐ ์ƒท)


์ด์Šˆ ๋ผ๋ฒจ

  • #55795D Feat
  • #0052CC Feat Fix
  • #cfd3d7 Feat Refactor
  • #a2eeef Feat Design
  • #2A9825 Feat Docs
  • #008672 Feat Test
  • #e4e669 Feat Chore
  • #d876e3 Feat Deploy
  • #075D93 Feat FE
  • #0052cc Feat BE
  • #B60205 Feat High
  • #FBCA04 Feat Middle
  • #1D76DB Feat Low
  • #03C897 Feat ๋ฆฌ๋ทฐ ์š”์ฒญ
  • #85E459 Feat ๋ฆฌ๋ทฐ ์™„๋ฃŒ


์ปค๋ฐ‹ ์ปจ๋ฒค์…˜

EX) Feat: #12 - ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ๋ ˆ์ด์•„์›ƒ

    ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ๋ ˆ์ด์•„์›ƒ ์™„์„ฑ
    ์ƒ‰๊น”์€ ๋ฉ”์ธํ…Œ๋งˆ์ƒ‰์ธ ์ดˆ๋ก์ƒ‰์œผ๋กœ ํ•จ
    [BE] url๋„ ์ถ”๊ฐ€ํ•จ
# <tag>: #<issue> - <subject>
##### Subject 50 characters ################# -> |

# Body Message
# [<field>:<๊ธฐ๋Šฅ์ด๋ฆ„>]
# - ์„ค๋ช…
######## Body 72 characters ####################################### -> |

# --- TAG NAME ---
#   Feat    : ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€
#   Fix     : ๋ฒ„๊ทธ ์ˆ˜์ •, ์ฝ”๋“œ ์Šคํƒ€์ผ ์ˆ˜์ • ์ฝ”๋“œ ํฌ๋งท ๋ณ€๊ฒฝ, ์„ธ๋ฏธ ์ฝœ๋ก  ๋ˆ„๋ฝ ๋“ฑ
#   Refactor: ์ฝ”๋“œ ๋ฆฌํŽ™ํ† ๋ง ๋กœ์ง ์ˆ˜์ • X
#   Design  : css, html, ๋ ˆ์ด์•„์›ƒ ์ˆ˜์ •
#   Docs    : ๋ฌธ์„œ ์ถ”๊ฐ€ ๋ฐ ์ˆ˜์ •
#   Test    : ๋ชจ๋“  ํ…Œ์ŠคํŠธ ์ž‘์—…
#   Chore   : ์žก๋‹คํ•œ ์ผ๋“ค
#   Deploy  : ๋ฐฐํฌ
# --- FIELD NAME ---
#   BE      : ์„œ๋ฒ„๊ด€๋ จ ์ž‘์—…
#   FE      : ํด๋ผ์ด์–ธํŠธ๊ด€๋ จ ์ž‘์—…
# ---- ์„ธ๋ถ€ ๊ทœ์น™ ------
# ์ œ๋ชฉ์ค„์€ ๋ช…๋ น์–ด๋กœ ์ž‘์„ฑํ•œ๋‹ค.
# ์ œ๋ชฉ์ค„์€ ๋งˆ์นจํ‘œ๋กœ ๋๋‚ด์ง€ ์•Š๋Š”๋‹ค.
# ๋ณธ๋ฌธ๊ณผ ์ œ๋ชฉ์—๋Š” ๋นˆ์ค„์„ ๋„ฃ์–ด์„œ ๊ตฌ๋ถ„ํ•œ๋‹ค.
# ๋ณธ๋ฌธ์—๋Š” "์–ด๋–ป๊ฒŒ" ๋ณด๋‹ค๋Š” "์™œ"์™€ "๋ฌด์—‡์„" ์„ค๋ช…ํ•œ๋‹ค.
# ๋ณธ๋ฌธ์— ๋ชฉ๋ก์„ ๋‚˜ํƒ€๋‚ผ๋•Œ๋Š” "- "๋กœ ์‹œ์ž‘ํ•œ๋‹ค.
# ------------------

๐Ÿค ๊ทœ์น™

๐Ÿ“ ๋ช…์„ธ์„œ

  • ๋””์ž์ธ ๋ช…์„ธ์„œ
  • MongoDB Diagram
  • ์ธํ”„๋ผ ๊ตฌ์กฐ
  • ํ”„๋กœ์ ํŠธ ํด๋” ๊ตฌ์กฐ
  • API ๋ช…์„ธ์„œ

    ๐Ÿ—‚ ๋ฐฑ๋กœ๊ทธ

    ๐Ÿ™‹โ€โ™‚๏ธ ํšŒ์˜๋ก

    ๐Ÿƒโ€โ™‚๏ธ ์Šคํ”„๋ฆฐํŠธ

    ๐Ÿ‘ฏโ€โ™€๏ธ ์Šคํฌ๋Ÿผ

    ๐Ÿง‘โ€๐Ÿซ ๋ฉ˜ํ† ๋ง

    ๐Ÿงโ€โ™‚๏ธ ํ”ผ์–ด์„ธ์…˜

    โœ๏ธ ํ•™์Šต ์ž๋ฃŒ

    ๐Ÿš€ ๊ธฐ์ˆ  ์Šคํƒ

    Exibition Notion

    Clone this wiki locally