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