Fork ๋ด Repo ๋ธ๋์น Clone
git clone -b {๋ณธ์ธ_์์ด๋} --single-branch https://github.com/{๋ณธ์ธ_์์ด๋}/{์ ์ฅ์ ์์ด๋}
ex) git clone -b javajigi --single-branch https://github.com/javajigi/java-baseball.git
Branch ์์ฑ
git checkout -b ๋ธ๋์น์ด๋ฆ
ex) git checkout -b step1
Push
git push origin ๋ธ๋์น์ด๋ฆ
ex) git push origin step1
Branch ์ญ์
git checkout ๋ณธ์ธ_์์ด๋
git branch -D ์ญ์ ํ _๋ธ๋์น์ด๋ฆ
ex) git checkout javajigi
ex) git branch -D step1
Fork Repo ๋ฅผ ๋๊ธฐํํ๊ธฐ ์ํ Origin Repo ์ถ๊ฐ (์ต์ด ํ ๋ฒ)
git remote add {์ ์ฅ์_๋ณ์นญ} base_์ ์ฅ์_url
ex) git remote add upstream https://github.com/woowacourse/java-racingcar.git
// ์์ ๊ฐ์ด woowacourse ์ ์ฅ์๋ฅผ ์ถ๊ฐํ ํ ์ ์ฒด remote ์ ์ฅ์ ๋ชฉ๋ก์ ๋ณธ๋ค.
git remote -v
Remote Repo ๋ธ๋์น ๊ฐฑ์ ํ๊ธฐ
git fetch upstream {๋ณธ์ธ_์์ด๋}
ex) git fetch upstream javajigi
Local ๋ธ๋์น์ ๋๊ธฐํํ๊ธฐ
git rebase upstream/๋ณธ์ธ_์์ด๋
ex) git rebase upstream/javajigi