origin vs upstream
์ธ์ ๋ฑ์ฅํ๋?
- ๋ค๋ฅธ ์ฌ๋ repo๋ฅผ forkํ์ ๋
๊ตฌ์กฐ
upstream → ์๋ณธ (๊ต์๋ / ๋ฉ์ธ ํ๋ก์ ํธ)
origin → ๋ด forkํ ์ ์ฅ์
local → ๋ด ์ปดํจํฐ
์์
git remote -v
ํ ์ค๋ก ์ ์ฒด ๊ตฌ์กฐ ์์ฝ
[ ๋ด ์ปดํจํฐ ]
↑ ↓
push pull
↓ ↑
[ origin (๋ด GitHub) ]
↑
pull
↑
[ upstream (์๋ณธ) ]
์ค์ ์์ ์ ์ผ ๋ง์ด ์ฐ๋ ์กฐํฉ
git status # ์ง๊ธ ์ํ
git add . # ๋ณ๊ฒฝ์ฌํญ ๋ด๊ธฐ
git commit -m "" # ์ ์ฅ
git push # GitHub๋ก
git pull # ์ต์ ์ํ๋ก ๋๊ธฐํ