๊ด€๋ฆฌ ๋ฉ”๋‰ด

๋ชฉ๋ก๊นƒํ—ˆ๋ธŒ ์—๋Ÿฌ (3)

Hey Tech

[Git/์—๋Ÿฌํ•ด๊ฒฐ] error: src refspec main does not match any error: failed to push some refs to ... ํ•ด๊ฒฐ์ฑ… 2๊ฐ€์ง€

โ“ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ error: src refspec main does not match any error: failed to push some refs to 'https://github.com/park-gb/[repository].git' push ํ•˜๋Š” ์ค‘์— ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ๋งˆ์ฃผํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๐Ÿ’ก ์›์ธ ์›์ธ์€ ํฌ๊ฒŒ 2๊ฐ€์ง€ ์ค‘ ํ•˜๋‚˜์ผ ์ˆ˜ ์žˆ์œผ๋ฉฐ ์›์ธ๋ณ„ ํ•ด๊ฒฐ์ฑ…์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค. ์›์ธ 1) ์›๊ฒฉ์ €์žฅ์†Œ ์—…๋ฐ์ดํŠธ ๊ฑด pull ๋ฐ›์ง€ ์•Š์€ ๊ฒฝ์šฐ ์›๊ฒฉ์ €์žฅ์†Œ๊ฐ€ ์—…๋ฐ์ดํŠธ๋˜์—ˆ๋Š”๋ฐ ๋กœ์ปฌ์ด ์ด๋ฅผ pull ๋ฐ›์ง€ ์•Š๊ณ  Push ํ•˜๋Š” ๊ฒฝ์šฐ push๊ฐ€ ์ œํ•œ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ํŒ€์›์ด ์›๊ฒฉ์ €์žฅ์†Œ์— ์ƒˆ๋กญ๊ฒŒ ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•˜์˜€์Œ์—๋„, ๋ณธ์ธ์ด ์ด๋ฅผ pull ๋ฐ›์ง€ ์•Š๊ณ  ๊ทธ๋ž˜๋„ push ํ•˜๋Š” ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. ํ•ด๊ฒฐ์ฑ… 1) ์›๊ฒฉ์ €์žฅ์†Œ pull ๋ฐ›๊ธฐ git..

SW ๊ฐœ๋ฐœ/Git 2023. 3. 22. 22:56
[Github] "fatal: remote origin already exists." ์›๊ฒฉ ์ €์žฅ์†Œ ์—ฐ๊ฒฐ ๋ฌธ์ œ ํ•ด๊ฒฐํ•˜๊ธฐ!

์•ˆ๋…•ํ•˜์„ธ์š”! ์˜ค๋Š˜์€ Github ์‚ฌ์šฉ ์ค‘ "fatal: remote origin already exists." ์—๋Ÿฌ ๋ฉ”์‹œ์ง€์— ๋Œ€์‘ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๊ณต์œ ํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ”ฅ ์—๋Ÿฌ ์ƒํ™ฉ Gitub์— ์ƒˆ๋กœ์šด ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•˜๊ณ , ํ„ฐ๋ฏธ๋„์—์„œ ํ•ด๋‹น ์ €์žฅ์†Œ์— ์—ฐ๊ฒฐ์„ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค. git remote add origin https://github.com/park-gb/algorithm-practice.git ๋ฐฉ๊ธˆ ๋งŒ๋“  ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์ž„์—๋„ ์ด๋ฏธ ์ €์žฅ์†Œ์™€ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ๋‹ค๋Š” ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜์˜ค๋„ค์š”? fatal: remote origin already exists. ์—ฐ๊ฒฐ ์ƒํƒœ๋ฅผ ํ™•์ธํ•ด ๋ดค์Šต๋‹ˆ๋‹ค. git remote -v ์•„๋ž˜ ๊ทธ๋ฆผ 1๊ณผ ๊ฐ™์ด, ์—ฐ๊ฒฐ์„ ์‹œ๋„ํ–ˆ๋˜ ์ €์žฅ์†Œ๊ฐ€ ์•„๋‹Œ ๋‹ค๋ฅธ ์ €์žฅ์†Œ์— ์—ฐ๊ฒฐ๋˜์–ด ์žˆ๋Š” ์ƒํƒœ์˜€์Šต๋‹ˆ๋‹ค. How to solve this..

SW ๊ฐœ๋ฐœ/Git 2021. 10. 4. 10:43