[TIL]_ Git

j-jhooยท2021๋…„ 10์›” 24์ผ
1

git

๋ชฉ๋ก ๋ณด๊ธฐ
2/3
post-thumbnail

๐ŸŒˆ westagram Git Guide

๐Ÿ”ฅ westagram ํด๋ก  ์ฝ”๋”ฉ ํŒ€ํ”„๋กœ์ ํŠธ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋ฉด์„œ ๋‚˜๋Š” ๊ฐ€์žฅ ํž˜๋“ค๊ณ  ์–ด๋ ค์› ๋˜ ๋ถ€๋ถ„์ค‘์— ํ•˜๋‚˜๋กœ git์‚ฌ์šฉ์„ ๋ฝ‘์„ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋‹ค. ์ฒ˜์Œ github์— ํ„ฐ๋ฏธ๋„์„ ํ†ตํ•ด์„œ ์˜ฌ๋ฆฌ๋Š” ๊ณผ์ •์—์„œ pull์„ ํ•˜์ง€ ์•Š๊ณ  push๋งŒ ํ•ด์„œ ์˜ค๋ฅ˜๊ฐ€ ๋–ด์„ ๋•Œ ์ •๋ง ๋‹นํ™ฉํ•˜๊ณ  ํž˜๋“ค์—ˆ์–ด์„œ โœ๏ธ์ •๋ฆฌํ•˜๋ ค๊ณ  ํ•œ๋‹ค.

๐ŸŒ€ git clone & git pull
๐Ÿ‘‰ ์ฒ˜์Œ remote์— ์žˆ๋Š” repository๋ฅผ git clone git pull ํ•ด์„œ local master ํด๋”๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.

๐ŸŒ€ git branch feature/jihoo & git checkout feature/jihoo
๐Ÿ‘‰ ๋งˆ์Šคํ„ฐ์—์„œ ์ดˆ๊ธฐ ์„ธํŒ… ์ง„ํ–‰ ์™„๋ฅ˜ ํ›„ git push๋ฅผ ํ•ด์„œ ๋จธ์ง€ ํ›„์— ๋งˆ์Šคํ„ฐ๋Š” ์‹ ์„ฑํ•œ ์˜์—ญ์ด๊ธฐ ๋•Œ๋ฌธ์— ์ƒˆ๋กœ์šด branch๋ฅผ ์ƒ์„ฑํ›„์— ๊ฑฐ๊ธฐ์„œ ํŒŒ์ผ ์ˆ˜์ •์„ ์ง„ํ–‰ํ•œ๋‹ค.

๐ŸŒ€ git add . & git commit -m "Add: "
๐Ÿ‘‰ ๊ฐœ์ธ branch์—์„œ ์ˆ˜์ • ์™„๋ฃŒ ํ›„์— remote master์— ์˜ฌ๋ฆฌ๊ธฐ ์ „์— commit ๋ฉ”์„ธ์ง€๋ฅผ ์ž‘์„ฑํ•œ๋‹ค.

๐ŸŒ€ git push origin feature/jihoo
๐Ÿ‘‰ ๊ฐœ์ธ branch๋ฅผ ์˜ฌ๋ฆด ๋•Œ push ์‚ฌ์šฉํ•ด์„œ ์˜ฌ๋ฆฐ๋‹ค.

๐ŸŒ€ pr template ์ž‘์„ฑ
๐Ÿ‘‰ github์— ์˜ฌ๋ผ๊ฐ„ ํŒŒ์ผ ํ™•์ธ ํ›„์— prํŽ˜์ด์ง€๋ฅผ ์ž‘์„ฑํ•œ๋‹ค. โœ… master์—์„œ ์˜ฌ๋ฆด ๊ฒฝ์šฐ์—๋Š” prํŽ˜์ด์ง€ ์ƒ์„ฑ๋ž€์ด ์—†๋‹ค!.


2. Team Project Flow


3. Conflict Resolution

profile
๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป ๋งค์ผ๋งค์ผ์ด ๊ธฐ๋Œ€๋˜๋Š” ๊ฐœ๋ฐœ์ž ^^

0๊ฐœ์˜ ๋Œ“๊ธ€