๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

TIL/Git

[Git] Your configuration specifies to merge with the ref 'refs/heads/branch name' from the remote, but no such ref was fetched

๋ฌธ์ œ

git pull ์‹œ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ์ƒ๊ฒผ๋‹ค.

our configuration specifies to merge with the ref 'refs/heads/branch name'from the remote, but no such ref was fetched

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

ํ•ด๋‹น ๋ธŒ๋žœ์น˜๊ฐ€ local์—๋งŒ ์กด์žฌํ•˜๊ณ  remote์—๋Š” ์กด์žฌํ•˜์ง€ ์•Š์„ ๋•Œ ๋ฐœ์ƒํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

1. ํ•ด๋‹น ๋ธŒ๋žœ์น˜๋ฅผ remote์—์„œ ๋ฐ›์•„์˜ค๊ธฐ ์œ„ํ•ด update ์‹ค์‹œ

git remote update

2. ๋ธŒ๋žœ์น˜๋ฅผ ํ™•์ธ

git branch -a

3. remote ๋ธŒ๋žœ์น˜๋ฅผ ๊ฐ€์ ธ์˜ค๊ธฐ

git checkout -t <branch name>

4. ๋ธŒ๋žœ์น˜ ์ „ํ™˜

git checkout <branch name>

 

์ฐธ๊ณ 

https://dev-castel.tistory.com/7