DevOps/Git

[GitHub] ํŒŒ์ผ ์˜ฌ๋ฆฌ๋Š”๋ฐ ์—๋Ÿฌ {error: failed to push some refs to 'https://github.com/~~~/****.git'}

chaerlo127 2021. 12. 14. 19:16
728x90

 

๊ฐ์ฒด์ง€ํ–ฅ์ ์–ธ์–ด์™€ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ˆ˜์—…์œผ๋กœ

backend frontend ํŒŒ์ผ์„ ์˜ฌ๋ฆฌ๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ

๊ฐ‘์ž๊ธฐ ์ด์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€,,,,,

error: failed to push some refs to 'https://github.com/~~~/***.git'

 

[ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•]

branch๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ์ด๊ธฐ ๋•Œ๋ฌธ์— 'branch๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

-> ๋‚˜๋Š” ์ด๋žฌ๋Š”๋ฐ, ์›๊ฒฉ์ €์žฅ์†Œ๋ž‘ ๋กœ์ปฌ์ €์žฅ์†Œ๊ฐ€ ๋‹ค๋ฅธ ๊ฒฝ์šฐ์—๋„ ๊ทธ๋Ÿด ์ˆ˜๊ฐ€ ์žˆ๋‹ค๊ณ  ํ•จ.

( git pull -> git push ํ•˜๋ฉด ํ•ด๊ฒฐ ์™„๋ฃŒ)

 

//1๋ฒˆ
$ git branch -m main

//2๋ฒˆ
$ git push -u origin main

 

 

git ํŒŒ์ผ ์ถ”๊ฐ€ ์™„๋ฃŒ!!

 

[์ถœ์ฒ˜] https://iancoding.tistory.com/240 

728x90