[Git] error: src refspec main does not match any

Dohyeon Koยท2021๋…„ 10์›” 20์ผ
0

๊นƒ

๋ชฉ๋ก ๋ณด๊ธฐ
1/1
post-thumbnail

์กฐ๋ณ„๊ณผ์ œ๋ฅผ ์ง„ํ–‰ํ•˜๋˜ ๋„์ค‘ origin repository ์˜ main branch ์— ํ‘ธ์‹œํ•˜๋ ค๋Š”๋ฐ ์•„๋ž˜์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.

ํ•ด๊ฒฐ ๊ณผ์ •

1.

git push -f origin main

์‹คํŒจ

2.

git checkout -b main
git push origin main

์„ฑ๊ณต

Local ์— master branch ๋งŒ ์žˆ์–ด์„œ ๋ฐœ์ƒํ•˜๋Š” ์˜ค๋ฅ˜์˜€๋‹ค.

profile
ํ‹ฐ์Šคํ† ๋ฆฌ๋กœ ์˜ฎ๊ฒผ์–ด์š”! (https://codekodo.tistory.com)

0๊ฐœ์˜ ๋Œ“๊ธ€