FRONTENDSCHOOL6 / react-project-11

๋ฉ‹์Ÿ์ด์‚ฌ์ž์ฒ˜๋Ÿผ ํ”„๋ก ํŠธ์—”๋“œ์Šค์ฟจ 6๊ธฐ ๋ฆฌ์•กํŠธ ํ”„๋กœ์ ํŠธ 11์กฐ
https://taingeleven.netlify.app/
0 stars 4 forks source link

๐Ÿงญ Git & Github Guide #2

Closed ryudg closed 1 year ago

ryudg commented 1 year ago
  1. ๊ฐ ์กฐ์›๋“ค์€ ์Šคํฌ๋Ÿผ ๋งˆ์Šคํ„ฐ์˜ repo์—์„œ fork๋ฅผ ํ†ตํ•ด repo๋ฅผ ์ƒ์„ฑํ•œ๋‹ค
  2. fork๋ฅผ ํ•œ ํ›„ git clone <repoURL> ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๋กœ์ปฌ์— ํŒŒ์ผ๋ฅผ ๋ถˆ๋Ÿฌ์˜จ๋‹ค.
  3. git remote update ๋ช…๋ น์–ด๋กœ ๋ฆฌ๋ชจํŠธ ๋œ ๋ธŒ๋žœ์น˜์˜ ๋ณ€๊ฒฝ์„ ์—…๋ฐ์ดํŠธ ํ•œ ํ›„
  4. ์Šคํฌ๋Ÿผ ๋ฆฌ๋”๊ฐ€ ์ƒ์„ฑํ•œ develop ๋ธŒ๋žœ์น˜๋ฅผ git checkout -t leader/develop ๋ช…๋ น์–ด๋กœ ๋กœ์ปฌ์— ๋ณต์‚ฌํ•œ๋‹ค
  5. git switch develop ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด main branch์—์„œ develop branch๋กœ ์ด๋™ํ•œ ํ›„ ๊ฐ ์กฐ์›๋“ค์€ ๊ฐ๊ฐ์˜ branch๋กœ ๋ถ„๊ธฐํ•œ๋‹ค. ex) header, vod, live...
  6. git push header ๋ช…๋ น์–ด๋กœ header branch๊ฐ€ ์ตœ์‹ ํ™”๊ฐ€ ๋˜์–ด์žˆ์ง€ ์•Š์œผ๋ฉด, ์ฆ‰ ๋‹ค๋ฅธ ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด (commit์„ ์ทจ์†Œํ•œ๋‹ค๋˜์ง€) ํ˜„์žฌ ์ž‘์—…ํ•˜๊ณ  ์žˆ๋Š” ๋ถ„๊ธฐ์ ์˜ ๊ณผ๊ฑฐ๋กœ ๋Œ์•„๊ฐ„๋‹ค๋ฉด git pull header pull ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด branch๋ฅผ ์ตœ์‹ ํ™”ํ•œ ๋’ค ์ž‘์—…์„ ์ง„ํ–‰ํ•˜์ž

image

  1. develop ๋ธŒ๋žœ์น˜๋Š” ํ•ญ์ƒ ์ตœ์‹  ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•˜๊ณ  push๋ฅผ ํ•˜์ง€ ์•Š๋Š”๋‹ค
  2. ์ž‘์—…์ด ์™„๋ฃŒ๋˜๋ฉด git add . git commit -m "commit" git push orign header ๋ช…๋ น์–ด๋ฅผ ์ˆœ์ฐจ์ ์œผ๋กœ ์ด์šฉํ•ด ๋ณธ์ธ์˜ ์›๊ฒฉ ์ €์žฅ์†Œ๋กœ ๋ณด๋‚ธ๋‹ค ์—ฌ๊ธฐ์„œ orign์€ ์Šคํฌ๋Ÿผ ๋งˆ์Šคํ„ฐ์˜ ์›๊ฒฉ์ €์žฅ์†Œ๊ฐ€ ์•„๋‹Œ ๋ณธ์ธ์˜ ์›๊ฒฉ ์ €์žฅ์†Œ๋ฅผ ์˜๋ฏธํ•œ๋‹ค.
  3. github ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ด pull request๋ฅผ ์ง„ํ–‰ํ•˜๋Š”๋ฐ ์ด๋•Œ ๋ฐ˜๋“œ์‹œ ๋ณธ์ธ์ด ์ƒˆ๋กœ ๋ถ„๊ธฐํ•œ branch์—์„œ ์Šคํฌ๋Ÿผ ๋งˆ์Šคํ„ฐ์˜ develop branch๋กœ PR์„ ์ง„ํ–‰ํ•œ๋‹ค.

image

  1. ๋งŒ์•ฝ ๋ณธ์ธ์˜ develop ๋ธŒ๋žœ์น˜๊ฐ€ ์ตœ์‹  ์ƒํƒœ๊ฐ€ ์•„๋‹ˆ๋ผ PR์ด ์ทจ์†Œ ๋˜์—ˆ๋‹ค๋ฉด ๋‹ค์‹œ vscode๋กœ ๋Œ์•„๊ฐ€ git pull leader develop(์Šคํฌ๋Ÿผ ๋งˆ์Šคํ„ฐ์˜ ๋ธŒ๋žœ์น˜๋ฅผ pull๋กœ ๋‹น๊ฒจ์˜จ๋‹ค) ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๋ณธ์ธ์˜ develop branch๋ฅผ ์ตœ์‹ ํ™”๋ฅผ ์ง„ํ–‰ํ•˜์ž
  2. ์ตœ์‹ ํ™”๋ฅผ ์ง„ํ–‰ํ–ˆ๋‹ค๋ฉด ๋ณธ์ธ์˜ branch๊ฐ€ develop์—์„œ ๋ถ„๊ธฐ๋œ ๋ณ„๋„์˜ branch์ธ์ง€ ํ™•์ธ์„ํ•˜๊ณ  git merge develop ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๋ธŒ๋žœ์น˜๋ฅผ ๋ณ‘ํ•ฉํ•˜์ž. ๋ณ‘ํ•ฉ์‹œ ์ถฉ๋Œ์ด ์ƒ๊ธด๋‹ค๋ฉด ๊ผผ๊ผผํžˆ ์ฝ์–ด๋ณด๊ณ  ์ˆ˜์ • ์‚ฌํ•ญ์„ ํ™•์ธํ•˜์ž
  3. PR์ด ์™„๋ฃŒ๋˜๊ณ  ๊ฐœ๋ฐœ์ด ๋๋‚œ branch๋Š” git branch -d header ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์‚ญ์ œ๋ฅผ ์ง„ํ–‰ํ•˜์ž

PR ์ง„ํ–‰์‹œ ๋ชจ๋“  ์กฐ์›๋“ค์€ ์Šคํฌ๋Ÿผ ๋งˆ์Šคํ„ฐ์˜ ํ™”๋ฉด์„ ๊ณต์œ  ๋ฐ›์•„ ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•˜๊ณ  ์ง„ํ–‰ ๊ณผ์ •์„ ๋”๋ธ” ์ฒดํฌ ํ• ๊ฒƒ

main branch๋Š” ๋ชจ๋“  ๊ณผ์ •์ด ๋๋‚œ ํ›„ merge ํ•œ๋‹ค

Github Project Management ์ž‘์„ฑ ๊ทœ์น™ ๊ฐœ์ธ ์ž‘์—…์„ ์ง„ํ–‰ํ•˜๊ณ  Issue๋ฅผ ์ž‘์„ฑ ๋ฐ Project์— ๋“ฑ๋ก์„ํ• ๋•Œ Title์— [๋ฉ”์ธํŽ˜์ด์ง€ - section] HTML ๋งˆํฌ์—…๊ณผ ๊ฐ™์ด ๊ฐ€๋…์„ฑ์„ ๋†’์—ฌ์ฃผ์ž

์ž‘์„ฑํ•œ ํŒŒ์ผ์— ์–ด์šธ๋ฆฌ๋Š” label๋„ ๋‹ฌ์•„์ฃผ๊ธฐ!!