Skip to content

Latest commit

ย 

History

History
189 lines (132 loc) ยท 4.82 KB

how-we-use-git.md

File metadata and controls

189 lines (132 loc) ยท 4.82 KB

Git Flow

๐Ÿ’ป main
 โ”— ๐Ÿ—‚ develop
   โ”ฃ ๐Ÿ“‘ 1st/camera_view
   โ”ฃ ๐Ÿ“‘ 1st/login_view
   โ”ฃ ๐Ÿ“‘ 2nd/card_detail
   โ”— ๐Ÿ“‘ ...
  • ๊ธฐ๋Šฅ๋ณ„ ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์–ด์„œ ์ž‘์—…ํ•ฉ๋‹ˆ๋‹ค.
  • master(main) - develop - feature branch ์˜ ํ˜•ํƒœ
  • master(main)
    • ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ์ƒํƒœ(= ์ œ์ถœ ๊ฐ€๋Šฅํ•œ ์ƒํƒœ)๋กœ ๊ด€๋ฆฌ
  • develop
    • ๋‹ค๋ฅธ ๋ธŒ๋žœ์น˜๋ฅผ ํ•ฉ์น˜๋Š” ํ†ตํ•ฉ ๋ธŒ๋žœ์น˜๋กœ์„œ ์‚ฌ์šฉ
    • ์šฐ๋ฆฌ์˜ feature branch๋ฅผ ์—ฌ๊ธฐ๋กœ merge ํ•˜์—ฌ ์˜ค๋ฅ˜๊ฐ€ ๋‚˜์ง€์•Š์€ ์•ˆ์ •์ ์ธ ์ƒํƒœ์ผ ๋•Œ main(master)์— ์˜ฌ๋ ค์„œ main(master)๋Š” ํ•ญ์ƒ ์•ˆ์ •์ ์ธ ์ƒํƒœ๋กœ ์œ ์ง€ํ•ฉ๋‹ˆ๋‹ค.
  • feature
    • feature ๋ธŒ๋žœ์น˜๋“ค์€ ๊ธฐ๋Šฅ๋ณ„๋กœ ์ƒ์„ฑํ•˜์—ฌ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
    • ์šฐ์„ ์ˆœ์œ„/๊ธฐ๋Šฅ์ด๋ฆ„ ์œผ๋กœ ์ด๋ฆ„์„ ์ง“์Šต๋‹ˆ๋‹ค. ex) 1st/login, 1st/home, 2nd/calendar, 3th/mypage
    • ๊ธฐ๋Šฅ ๊ตฌํ˜„์ด ์™„๋ฃŒ๋œ๋‹ค๋ฉด develop์œผ๋กœ ๋ณ‘ํ•ฉ ํ›„ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.

Git Message

  1. ๋จผ์ € ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€๋Š” ํฌ๊ฒŒย ์ œ๋ชฉ, ๋ณธ๋ฌธ, ๊ผฌ๋ฆฌ๋งย ์„ธ ๊ฐ€์ง€ ํŒŒํŠธ๋กœ ๋‚˜๋ˆ„๊ณ , ๊ฐ ํŒŒํŠธ๋Š” ๋นˆ์ค„์„ ๋‘์–ด์„œ ๊ตฌ๋ถ„ํ•ฉ๋‹ˆ๋‹ค.
  2. ์ปค๋ฐ‹ ๋ฉ”์„ธ์ง€๋Š” ๋ชจ๋‘ ํ•œ๊ธ€๋กœ ํ†ต์ผํ•ฉ๋‹ˆ๋‹ค.
  3. ์ œ๋ชฉ์˜ ๊ฒฝ์šฐ, type์€ ๋Œ€๊ด„ํ˜ธ ์•ˆ์— ์†Œ๋ฌธ์ž๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
  4. ์ด์Šˆ๋ฅผ ํ•ด๊ฒฐํ–ˆ๋‹ค๋ฉด, footer์— ์ ์Šต๋‹ˆ๋‹ค.(footer๋Š” ์ƒ๋žต ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.)
[type] Subject ย // ->ย ์ œ๋ชฉ 

(ํ•œ ์ค„์„ ๋„์›Œ ๋ถ„๋ฆฌํ•ฉ๋‹ˆ๋‹ค.)

body //ย  ->ย ๋ณธ๋ฌธย 

(ํ•œ ์ค„์„ ๋„์›Œ ๋ถ„๋ฆฌํ•ฉ๋‹ˆ๋‹ค.)

footer(์˜ต์…˜) // ->ย ๊ผฌ๋ฆฌ๋ง

type

  • ์–ด๋–ค ์˜๋„๋กœ ์ปค๋ฐ‹ํ–ˆ๋Š”์ง€๋ฅผ type์— ๋ช…์‹œํ•ฉ๋‹ˆ๋‹ค.
  • ์ œ๋ชฉ์€ ์ตœ๋Œ€ 50๊ธ€์ž๊ฐ€ ๋„˜์ง€ ์•Š๋„๋ก ํ•˜๊ณ  ๋งˆ์นจํ‘œ๋Š” ์ฐ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  1. featย : ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€ํ•˜๊ธฐ

    [feat] ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ๋‚ ์งœ ์„ ํƒ ํ•˜๋Š” ๊ธฐ๋Šฅ ์ถ”๊ฐ€
    
    body: ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ picker๋ฅผ ํ†ตํ•ด ๋‚ ์งœ๋ฅผ ์„ ํƒํ•˜๊ฒŒ ๊ตฌํ˜„
    picker๋ทฐ๋Š” toolbar๋ฅผ ์ด์šฉํ–ˆ์Œ
  2. fixย : ๋ฒ„๊ทธ ์ˆ˜์ •ํ•˜๋Š” ๊ฒฝ์šฐ

    [fix] ๋ผ๋ฒจ ๊ธธ์ด๊ฐ€ ์งค๋ฆฌ๋Š” ๋ฒ„๊ทธ ์ˆ˜์ •
    
    body: ๋ผ๋ฒจ ๊ธธ์ด๋ฅผ view leading์—์„œ ๊ฐ„๊ฒฉ ์ถ”๊ฐ€
  3. refactorย : ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง ํ•˜๋Š” ๊ฒฝ์šฐ

    [refactor] MainVC ์ฝ”๋“œ ์ •๋ฆฌ
    
    body: convension ๋‚ด์šฉ ์ค‘ ๋ณ€์ˆ˜๋ช…์„ ์ง€ํ‚ค์ง€ ๋ชปํ•œ ์  ์ˆ˜์ •
    lowerCamelCase๋ฅผ ์ง€์ผœ์„œ ๋ณ€์ˆ˜๋ช…์„ ์ˆ˜์ •ํ–ˆ์Œ
    
  4. styleย : ์ƒ‰์ƒ ๋ณ€๊ฒฝ, ํฐํŠธ ๋ณ€๊ฒฝ ๋“ฑ์ด ์žˆ๋Š” ๊ฒฝ์šฐ

    [style] back ๋ฒ„ํŠผ ์ƒ‰์ƒ red๋กœ ๋ณ€๊ฒฝ
    
    body: ์ œํ”Œ๋ฆฐ ์ˆ˜์ •์œผ๋กœ ์ธํ•ด black -> red๋กœ ๋ณ€๊ฒฝ
  5. uploadย : ํŒŒ์ผ ์ƒ์„ฑํ•˜๋Š” ๊ฒฝ์šฐ

    [upload] HomeVC ํŒŒ์ผ ์ƒ์„ฑ
  6. docsย : ๋ฌธ์„œ ์ˆ˜์ •ํ•˜๋Š” ๊ฒฝ์šฐ

    [docs] README.md ํŒŒ์ผ ์ˆ˜์ •
    
    body: Git Message Convention ๋ฐฉ๋ฒ• ์ •๋ฆฌ

body

  • "body: " ๋ฅผ ์•ž์— ํฌํ•จํ•˜์—ฌ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ๊ธด ์„ค๋ช…์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ์— ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ์–ด๋–ป๊ฒŒย ํ–ˆ๋Š”์ง€๊ฐ€ ์•„๋‹ˆ๋ผ,ย ๋ฌด์—‡์„ย ์™œย ํ–ˆ๋Š”์ง€๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ์ตœ๋Œ€ 75์ž๋ฅผ ๋„˜๊ธฐ์ง€ ์•Š๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

footer (์ƒ๋žต ๊ฐ€๋Šฅ)

  • ๊ผฌ๋ฆฌ๋ง์€ optional์ด๊ณ  ์ด์Šˆ ํŠธ๋ž˜์ปค ID๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

  • ๊ผฌ๋ฆฌ๋ง์€ "์œ ํ˜•: #์ด์Šˆ ๋ฒˆํ˜ธ" ํ˜•์‹์œผ๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

  • ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ด์Šˆ ๋ฒˆํ˜ธ๋ฅผ ์ ์„ ๋•Œ๋Š” ์‰ผํ‘œ๋กœ ๊ตฌ๋ถ„ํ•ฉ๋‹ˆ๋‹ค.

  • ์ด์Šˆ ํŠธ๋ž˜์ปค ์œ ํ˜•์€ ๋‹ค์Œ ์ค‘ ํ•˜๋‚˜๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

    • Fixes: ์ด์Šˆ ์ˆ˜์ •์ค‘ (์•„์ง ํ•ด๊ฒฐ๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ)
    • Resolves: ์ด์Šˆ๋ฅผ ํ•ด๊ฒฐํ–ˆ์„ ๋•Œ ์‚ฌ์šฉ
    • Ref: ์ฐธ๊ณ ํ•  ์ด์Šˆ๊ฐ€ ์žˆ์„ ๋•Œ ์‚ฌ์šฉ
    • Related to: ํ•ด๋‹น ์ปค๋ฐ‹์— ๊ด€๋ จ๋œ ์ด์Šˆ๋ฒˆํ˜ธ (์•„์ง ํ•ด๊ฒฐ๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ)

    ex)

    • Fixes: #45
    • Related to: #34, #23
    • close #45
    • Related to: #112
[feat] "์ถ”๊ฐ€ ๋กœ๊ทธ์ธ ํ•จ์ˆ˜" ๋กœ๊ทธ์ธ ์„œ๋ฒ„ ์—ฐ๊ฒฐ

body: ๋กœ๊ทธ์ธ ๊ตฌ์กฐ์ฒด ์ƒ์„ฑ(Login Model)
๋กœ๊ทธ์ธ URL ์—ฐ๊ฒฐ

Resolves: #5


Template

meaning iOS ํŒ€์€ ๋” ๋‚˜์€ ๊ฐœ๋ฐœ ํ˜‘์—…์„ ์œ„ํ•ด PR, ISSUE ํ…œํ”Œ๋ฆฟ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

01 PR Template

## ์ž‘์—… ๋‚ด์šฉ 
[ ]
[ ] 
[ ] 

## ๊ด€๊ณ„๋œ ์ด์Šˆ, PR : 

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

## ๋ ˆํผ๋Ÿฐ์Šค 

02 Issue Template - Bug

## ์–ด๋–ค bug ์ธ๊ฐ€์š”? 

## ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ ๋˜๋Š” ์Šคํฌ๋ฆฐ์ƒท

## bug ํ™•์ธ ๋ฐฉ๋ฒ•
1. bug ์œ„์น˜ 
2. ์–ด๋–ป๊ฒŒ ๋ฐœ์ƒํ•˜๋Š”์ง€ (์ปดํŒŒ์ผ ์—๋Ÿฌ, ๋“ฑ )

## tried out solution 

03 Issue Template - Challenge

## CHALLENGE ๋‚ด์šฉ 
- [] ex. ์ปฌ๋ ‰์…˜ ๋ทฐ ๋ ˆ์ด์•„์›ƒ ์žก๊ธฐ
- []
- [] 

## ๊ด€๋ จ ์Šคํฌ๋ฆฐ์ƒท 

## ๊ด€๋ จ๋œ ์ด์Šˆ

## ๋…ผ์˜ํ–ˆ๋˜ ๊ด€๋ จ ๋ ˆํผ๋Ÿฐ์Šค

## ์œ ์˜ํ•  ์  

Git Tool

meaning iOS ๋Š” ๋” ๋‚˜์€ git hub ํ˜‘์—…์„ ์œ„ํ•ด zenhub ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. zenhub๋ฅผ ํ†ตํ•ด epic๊ณผ issue๋ฅผ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.