Git

[GitHub] ๋ธŒ๋žœ์น˜ ๋ฎ์–ด ์”Œ์šฐ๊ธฐ

ํƒฑ์ ค 2021. 3. 4. 13:24

๋ณ€๊ฒฝ๋œ Upstream branch๋ฅผ develop branch๋กœ ๋ฎ์–ด์”Œ์šฐ๊ธฐ (์ตœ์‹ ์ƒํƒœ๋ฅผ pull)

  1. upstream์„ remote๋กœ ๋“ฑ๋ก
  2. upstream ๋‚ด์šฉ fetch
  3. develop branch์™€ upstream ๋ณ‘ํ•ฉ -> ์—ฌ๊ธฐ๊นŒ์ง€ ํ•˜๋ฉด ๋‚ด ์ฝ”๋“œ๊ฐ€ ์ตœ์‹  ์ฝ”๋“œ๋กœ ๋ฐ”๋€œ
  4. ๋‹ค์Œ ์ž‘์—…์„ ์œ„ํ•ด ์ง€๊ธˆ develop branch๋ฅผ push
git remote add upstream "upstream git ์ฃผ์†Œ"
git fetch upstream
git merge upstream/develop
git push origin develop

(merge๋Š” upstream์ด ์ตœ์‹  ์ƒํƒœ๊ฐ€ ๋˜์—ˆ๋‹ค๋Š” ๋œป, ๋‚˜์™€ ํ˜‘์—…์ž๋“ค์€ ์ด ์ตœ์‹ ์˜ upstream์„ ๋‹ค์‹œ pull๋ฐ›์•„ ์ตœ์‹  ํ™˜๊ฒฝ์—์„œ ์ƒˆ๋กญ๊ฒŒ ์ž‘์—…ํ•ด์•ผํ•จ)


์ฐธ๊ณ : medium.com/@yms0214/git-%ED%98%91%EC%97%85%ED%95%98%EA%B8%B0-upstream-merge-%ED%9B%84-%EC%B5%9C%EC%8B%A0%EC%83%81%ED%83%9C-pull-%EB%B0%9B%EA%B8%B0-213bc2c1c249

 

๊นƒ ๋ธŒ๋žœ์น˜ ์ข…๋ฅ˜ ์„ค๋ช…๊ธ€(๋‚˜์ค‘์— ๋‹ค์‹œ ๋ณด๊ธฐ): gmlwjd9405.github.io/2018/05/11/types-of-git-branch.html

 

728x90