All pages
Powered by GitBook
1 of 1

Loading...

Git Workflow

Git์€ ์ €์žฅ์†Œ์™€ ๊ด€๊ณ„์—†์ด ๋ธŒ๋žœ์น˜๋งŒ์„ ๊ธฐ์ค€์œผ๋กœ ์ž‘์—…ํ•œ๋‹ค๊ณ  ์ดํ•ดํ•˜๋ฉด ์‰ฝ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ๋ธŒ๋ฆฌ๋“œ ๋ฉ”์ธ์ €์žฅ์†Œ์™€ forkํ•œ ๋‚ด ์ €์žฅ์†Œ ๊ฐ„์— sync๋ฅผ ๋งž์ถ”๋Š” ์ž‘์—…์€ ํ•˜์ง€ ์•Š์•„๋„ ๋ฉ๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ์„ ์ง„ํ–‰ํ•˜๊ธฐ ์ „ ์ฝ”๋“œ๋ฅผ upstream์œผ๋กœ๋ถ€ํ„ฐ ๋ฐ˜์˜ ํ•  ๋ธŒ๋žœ์น˜๋ฅผ ๊ฐ€์ ธ์™€ ์ž‘์—…์„ ์‹œ์ž‘ํ•˜๊ณ , ๊ฒฐ๊ณผ๋ฌผ์„ origin์— ์˜ฌ๋ฆฌ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์˜ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ฐธ๊ณ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

git remote add upstream https://github.com/CUBRID/cubrid.git

git remote -v
#====
#    origin  http://github.com/hgryoo/cubrid (fetch)
#    origin  http://github.com/hgryoo/cubrid (push)
#    upstream        http://github.com/cubrid/cubrid (fetch)
#    upstream        http://github.com/cubrid/cubrid (push)

git fetch upstream

# ์ž‘์—…ํ•  ์ƒˆ๋กœ์šด ๋ธŒ๋žœ์น˜ ๊ฐ€์ ธ์˜ค๊ธฐ, upstream์œผ๋กœ๋ถ€ํ„ฐ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ!
# git push๋กœ ์ž˜๋ชป ๋ฐ˜์˜๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด 
# ์•„๋ž˜ ๋‘ ๋ช…๋ น์–ด๋Š” ํ•ญ์ƒ ํ•จ๊ป˜ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
git checkout -b CBRD-55555_my_work upstream/develop
git push -u origin CBRD-55555_my_work

# ์ž‘์—…ํ•˜๊ธฐ
git add ...
git commit โ€ฆ

# ์†Œ์Šค๋ฅผ ์˜ฌ๋ฆด remote ์ด๋ฆ„๊ณผ ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์„ ํ•ญ์ƒ ์ ์–ด์ค๋‹ˆ๋‹ค
git push origin CBRD-55555_my_work

# upstream์˜ develop์˜ ๋‚ด์šฉ์„ ๋ฐ˜์˜ํ•˜๊ณ  ์‹ถ์„ ๋•Œ
git fetch upstream
git merge upstream/develop