๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ป DEV/GitHub4

[Github - git flow]Git Flow ์ „๋žต - squash merge Git Flow Strategy ๋ฅผ ํ†ตํ•ด์„œ ํ”„๋กœ์ ํŠธ ํ˜‘์—… · ํ˜•์ƒ๊ด€๋ฆฌ๋ฅผ ์ด์–ด๊ฐ€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.์ƒ์„ฑํ•œ feature ๋ธŒ๋žœ์น˜๋ฅผ develop ๋ธŒ๋žœ์น˜์— ๋ณ‘ํ•ฉ(merge)ํ•  ๋•Œ์— ํ๋ฆ„๊ณผ ๋ฐฉ๋ฒ•์„ ๋ฉ”๋ชจํ•˜๊ณ ์ž ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.ํŠนํžˆ ์ปค๋ฐ‹-ํ‘ธ์‹œ ์ด๋ ฅ์„ ๊ฐ„๊ฒฐ·์ •๋ˆ๋˜๊ฒŒ ํ•ด์ฃผ๋Š” squash merge๋ฅผ ์ค‘์ ์ ์œผ๋กœ ๋‹ค๋ฃจ๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์š”์•ฝ  1. ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ (Owner or Admin)   2. ๋กœ์ปฌ์—์„œ Clone ํ›„ git flow init   3. develop ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ   4. feature ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ   5. push ๋ฐ PR (Pull Request)   6. PR close & squash merge ์ƒ์„ธ   1. ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ (Owner or Admin)     2. ๋กœ์ปฌ์—์„œ Clone ํ›„ git flow ini.. 2024. 8. 6.
[Github] Git ํ‘ธ์‹œ ํ•ด์ฃผ๋Š” ๊ณ„์ • ๋ฐ”๊ฟ”์ฃผ๊ธฐ(username, useremail) ์ธํ…”๋ฆฌ์ œ์ด๋ฅผ ์‚ฌ์šฉํ•ด ๊ฐœ์ธ๊ณผ ํšŒ์‚ฌ์˜ 2๊ฐœ Github ๊ณ„์ •์— ๋Œ€ํ•œ version control์„ ์ง„ํ–‰ํ•˜๋ฉฐ ํ”„๋กœ์ ํŠธ์˜ ํด๋ก  ๋“ฑ์„ ๊ฐ„ํŽธํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํด๋ก  ์ดํ›„, ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•ด ์ปค๋ฐ‹-ํ‘ธ์‹œ ์ž‘์—…์ด ์ด์–ด์ง€๋˜ ๊ณผ์ • ํšŒ์‚ฌ์˜ ํ”„๋กœ์ ํŠธ์— ๊ฐœ์ธ์˜ ๊ณ„์ •์œผ๋กœ ํ‘ธ์‹œ๊ฐ€ ์ง„ํ–‰๋˜๊ณ  ์ด๋ ฅ์ด ๋‚จ๊ณ  ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ฒŒ๋˜๊ณ ๋Š” ํ”„๋กœ์ ํŠธ๋งˆ๋‹ค Git push๋ฅผ ํ•ด์ฃผ๋Š” ๊ณ„์ •์„ ๋ณ€๊ฒฝ-์ง€์ •ํ•ด์ฃผ๋Š” ๋ฐฉ๋ฒ•์„ ์ฐพ์•„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค. ์š”์•ฝ  1. ํ˜„์žฌ ์—ฐ๊ฒฐ๋œ ๊ณ„์ • ์•Œ์•„๋ณด๊ธฐ   2. ํฌ๋งํ•˜๋Š” ๊ณ„์ •์œผ๋กœ ๋ณ€๊ฒฝํ•˜๊ธฐ์ƒ์„ธ  1. ํ˜„์žฌ ์—ฐ๊ฒฐ๋œ ๊ณ„์ • ์•Œ์•„๋ณด๊ธฐ# ํ˜„์žฌ ๊ณ„์ •์˜ ๋‹‰๋„ค์ž„(์ด๋ฆ„) ์•Œ์•„๋ณด๊ธฐgit config user.name# ํ˜„์žฌ ๊ณ„์ •์˜ ์ด๋ฉ”์ผ ์•Œ์•„๋ณด๊ธฐgit config user.email  2. ํฌ๋งํ•˜๋Š” ๊ณ„์ •์œผ๋กœ ๋ณ€๊ฒฝํ•˜๊ธฐ# ํฌ๋งํ•˜๋Š” ๊ณ„์ •์˜ ๋‹‰๋„ค์ž„(์ด๋ฆ„)์œผ๋กœ ๋ณ€.. 2024. 8. 2.
[Github] main branch๋ฅผ master ๋กœ ๋ฐ”๊พธ๊ณ  default ๊ฐ’ ๋ณ€๊ฒฝํ•˜๊ธฐ Git Flow strategy์„ ํ†ตํ•ด ํ”„๋กœ์ ํŠธ ํ˜‘์—…-ํ˜•์ƒ๊ด€๋ฆฌ๋ฅผ ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. Git์—์„œ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•  ์‹œ, main(default) ๋ธŒ๋žœ์น˜๊ฐ€ ์ƒ์„ฑ์ด ๋ฉ๋‹ˆ๋‹ค.master, develop, release ๋ธŒ๋žœ์น˜ ๋“ฑ์ด ํ•„์š”ํ•œ ๊ฐ€์šด๋ฐ, main ๋ธŒ๋žœ์น˜๋ฅผ master ๋ธŒ๋žœ์น˜๋กœ ๋ฐ”๊พธ๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค. ์š”์•ฝ  1. ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ• (web์ƒ์—์„œ ๋ณ€๊ฒฝ)   2. ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ• (command๋กœ ๋ณ€๊ฒฝ)์ƒ์„ธ  1. ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ• (web์ƒ์—์„œ ๋ณ€๊ฒฝ) ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ Github(web)์—์„œ ๋ณ€๊ฒฝ์ž…๋‹ˆ๋‹ค.โ—ผ๏ธŽ 1) ๋ธŒ๋žœ์น˜๋ช…์„ ๋ฐ”๊พธ๊ณ ์ž ํ•˜๋Š” ํ”„๋กœ์ ํŠธ ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋กœ ์ง„์ž…์„ ํ•ฉ๋‹ˆ๋‹ค.โ—ผ๏ธŽ 2) settings > General ์— ์ง„์ž…ํ•ฉ๋‹ˆ๋‹ค.โ—ผ๏ธŽ 3) 'Default branch' ์„น์…˜์—์„œ main ๋ธŒ๋žœ์น˜๋กœ ์„ค์ •๋ผ ์žˆ์Œ.. 2024. 8. 2.
[Github] ๋งˆ์ง€๋ง‰ commit ๋‚ ์งœ ๋ณ€๊ฒฝ(์ˆ˜์ •) 2022๋…„ ์ƒˆํ•ด, ๋ชฉํ‘œํ•œ ๊ฒŒ ์žˆ๋‹ค๋ฉด 1์ผ 1์ปค๋ฐ‹ ์ž”๋””๊น”๊ธฐ! ๋•Œ๋•Œ๋กœ commit + push๋ฅผ ์žŠ์„ ๋•Œ๋ฉด, ๊ธฐ๋ก์ด ๋‚จ์ง€ ์•Š๋Š”๋‹ค๋Š” ์‚ฌ์‹ค๊ณผ ๋‹น์ผ์˜ ๋…ธ๋ ฅ์ด ๋ฌด์‚ฐ๋˜๋Š” ๋“ฏํ•œ ์•„์‰ฌ์›€์„ ๋‚จ๊ธด ์ฑ„ ๋‹ค์Œ ๋‚ ์„ ๋งž์ดํ•˜๊ฒŒ ๋œ๋‹ค. ๊ทธ๋ž˜์„œ, ์ด๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์€ ์—†์„๊นŒ ์ฐพ์•„๋ณธ ๊ฒฐ๊ณผ! "๋งˆ์ง€๋ง‰ commit์˜ ๋‚ ์งœ๋ฅผ ๋ณ€๊ฒฝ"ํ•˜๋Š” ๊ฐ„๋‹จํ•œ ๋ฐฉ๋ฒ•์„ ์ฐพ๊ฒŒ ๋ผ ์ •๋ฆฌํ•ด๋ณธ๋‹ค. 1. Git cmd๋ฅผ ํ†ตํ•ด ํฌ๋งํ•˜๋Š” ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ ๊ฒฝ๋กœ์ ‘๊ทผ (cd ~) 2. commit ๋‚ด์—ญ, ํŠน์ • ๋‚ ์งœ๋กœ ์ˆ˜์ •(๋ณ€๊ฒฝ)ํ•˜๊ธฐ git commit --amend --no-edit --date "(์˜๋ฌธ) ์š”์ผ ์›” ์ผ ์—ฐ๋„ ์‹œ:๋ถ„:์ดˆ KST" git commit --amend --no-edit --date "Sat 4 Jun 2022 15:15:15 KST" 3. ํ™•์ธํ•ด๋ณด๊ธฐ .. 2022. 6. 9.