Sujin's Blog

์†Œํ”„ํŠธ์›จ์–ด ์•„ํ‚คํ…์ฒ˜ The Hard Parts

๋„์„œ ์ •๋ณด ์†Œํ”„ํŠธ์›จ์–ด ์•„ํ‚คํ…์ฒ˜ ๋ฌธ์ œ-ํ•ด๊ฒฐ์„ ์œ„ํ•œ ์ง€์‹๊ณผ ์‹ค์šฉ์  ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ๋‹ค๋ฃจ๋Š” ์•ˆ๋‚ด์„œ ใ€Ž์†Œํ”„ํŠธ์›จ์–ด ์•„ํ‚คํ…์ฒ˜ 101ใ€์˜ ์‹ค๋ฌดํŽธ์— ํ•ด๋‹นํ•˜๋Š” ํ›„์†์ž‘์ด๋‹ค. ๋ถ„์‚ฐ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๊ตฌ์ถ•ํ•  ๋•Œ ์„œ๋น„์Šค๋ฅผ ๋‚˜๋ˆ ์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ์™€ ํ•ฉ์ณ์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๋ฅผ ๊ฐ๊ฐ ์„ธ๋ถ„๋„(granularity) ๋ถ„ํ•ด์ธ๊ณผ ํ†ตํ•ฉ์ธ์ด๋ผ๋Š” ๋‘ ๊ฐ€์ง€ ๊ด€์ ์—์„œ ๋ฐ”๋ผ๋ณด๊ณ , ์–ด๋–ป๊ฒŒ ํ•˜๋ฉด ์•„ํ‚คํ…ํŠธ๊ฐ€ ๊ฐ๊ด€์ ์œผ...

git rebase

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh ์ด๋ฒˆ ๋‚ด์šฉ์€ git merge-2 ์™€ ์ด์–ด์ง€๋Š” ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. ์ด๋ฒˆ์—” git rebase ๋ฅผ ์‚ดํŽด๋ด…์‹œ๋‹ค! git rebase ๋ฅผ ์ด์šฉํ•ด merge ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ branch ์ƒํ™ฉ ๋ชฉํ‘œ branch ์ƒํ™ฉ hotfix2 merge ๋˜๋Œ๋ฆฌ๊ธฐ ํ˜„์žฌ branch ์ƒํ™ฉ...

git merge 2

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh ** ์ด๋ฒˆ ๋‚ด์šฉ์€ git merge-1 ์™€ ์ด์–ด์ง€๋Š” ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.** git merge-1 ํฌ์ŠคํŠธ merge ๋Š” branch๋ฅผ ํ•ฉ์น˜๋Š” ์ผ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค! merge๋ฅผ ํ•˜๋Š” ๋ฐฉ๋ฒ•๊ณผ merge ํ•˜๋Š” ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์ถฉ๋Œ ๊ทธ๋ฆฌ๊ณ  ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ์—ฌ๋Ÿฌ ์ข…๋ฅ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š”...

git merge 1

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh merge ๋Š” branch๋ฅผ ํ•ฉ์น˜๋Š” ์ผ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค! merge๋ฅผ ํ•˜๋Š” ๋ฐฉ๋ฒ•๊ณผ merge ํ•˜๋Š” ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์ถฉ๋Œ ๊ทธ๋ฆฌ๊ณ  ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ์—ฌ๋Ÿฌ ์ข…๋ฅ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ์—” ๊ธฐ๋ณธ์ ์ด๊ณ  ๊ฐ„๋‹จํ•œ merge์— ๋Œ€ํ•ด ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ถœ์ฒ˜: https://geeks.uniplaces.c...

git branch

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh branch ๋ž€? ์ด๋ฆ„์—์„œ ์•Œ ์ˆ˜ ์žˆ๋“ฏ์ด ๊ฐ€์ง€์น˜๊ธฐ๋ฅผ ํ•˜๋Š” ๊ฒƒ์„ ๋งํ•ฉ๋‹ˆ๋‹ค. branch๋ฅผ ์—ฌ๋Ÿฌ ๊ฐœ ์ƒ์„ฑํ•ด ์ž‘์—…์„ ๋…๋ฆฝ์ ์œผ๋กœ ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•„์š” ์‹œ merge๋ฅผ ํ†ตํ•ด ํ•˜๋‚˜๋กœ ํ•ฉ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ถœ์ฒ˜: https://geeks.uniplaces.com/mastering...

git revert

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh git reset ๊ณผ ๋น„์Šทํ•œ๋“ฏ ๋‹ค๋ฅธ git revert! git reset์€ ์ด์ „์˜ ์ƒํƒœ๋กœ ๋Œ๋ฆฌ๋Š” ๊ฒƒ์ด๋ผ๋ฉด git revert๋Š” ์ด์ „ ์ƒํƒœ๋ฅผ ๋ณ€๊ฒฝ์‹œํ‚ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. git reset git revert ํ˜„์žฌ git log ์ƒํ™ฉ ์‹ค์Šต์„ ์œ„ํ•ด commit ์„ ์ถ”๊ฐ€ํ•˜...

git reset

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh ์ปค๋ฐ‹์„ ๋˜๋Œ๋ฆด ์ˆ˜ ์žˆ๋Š” git reset! ์ €์žฅ ๋˜์–ด์žˆ๋Š” ์ƒํƒœ๋กœ ๋˜๋Œ๋ฆฌ๋Š” ๋ช…๋ น์–ด ์ž…๋‹ˆ๋‹ค. โ€“soft ์˜ต์…˜์€ commit ๋งŒ ๋˜๋Œ๋ ค๋†“๊ณ  โ€“hard ์˜ต์…˜์€ commit ๊ณผ ํŒŒ์ผ ๋ชจ๋‘ ๋˜๋Œ๋ ค ๋†“์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ git log โ€“soft ์˜ต์…˜ ๋˜๋Œ๋ฆฌ๊ธฐ ์ „์— ๋˜...

git commit --amend

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh git commit โ€“amend๋ฅผ ์‚ดํŽด๋ด…์‹œ๋‹ค! git commit โ€“amend ๋ฉ๋ น์„ ํ†ตํ•ด ๋งˆ์ง€๋ง‰ commit์„ ์ˆ˜์ •, ๋ณ€๊ฒฝ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ git log 1. ์‹ค์Šต์„ ์œ„ํ•ด ์ƒˆ๋กœ์šด ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด๋ด…์‹œ๋‹ค. gito1.py ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ...

git tag

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh git tag๋ฅผ ์•Œ์•„๋ด…์‹œ๋‹ค. commit ํ•œ ๋‚ด์šฉ์— tag๋ฅผ ๋ถ™์ผ ์ˆ˜ ์žˆ๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค. 1. ์‹ค์Šต์„ ์œ„ํ•ด ์ƒˆ๋กœ์šด ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด๋ด…์‹œ๋‹ค. vim์œผ๋กœ nothing.py ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. vim์œผ๋กœ new_gito.txt ์ƒ์„ฑ (1).ํ‚ค๋ณด๋“œ i = in...

.gitignore+

์‹ค์Šต ํ™˜๊ฒฝ: Mac OS & zsh with oh-my-zsh .gitignore ํ•˜๊ณ ๋‚˜๋ฉด ์–ด๋–ค ๋ณ€ํ™”๊ฐ€ ์žˆ๋Š”์ง€ ์•Œ์•„๋ด…์‹œ๋‹ค. .git ํด๋” ๋‚ด๋ถ€ objects ์ˆจ๊น€ ํด๋”๋ฅผ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด command + shift + . ์ˆจ๊น€ ํŒŒ์ผ๋กœ .gitignore์ด ์ƒ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ํŒŒ์ผ ๋‚ด์šฉ์€ .gitignore์— ์ž‘์„ฑํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.

Trending Tags