git pull시 Your configuration specifies to merge with the ref 'refs/heads/branch name'from the remote, but no such ref was fetched.

2020. 6. 29. 10:42카테고리 없음

git pull 시

Your configuration specifies to merge with the ref 'refs/heads/<branch name>'

from the remote, but no such ref was fetched.

이러한 에러가 나면서 git pull이 안되는 경우가 있다

해당 에러는 해당 브랜치가 local에만 존재하고 remote에는 없을 경우 일어난다

 

해결책 :

1. 해당 branch를 remote에서 받아온다

git remote update

 

branch 확인은

git branch -a

원격의 branch 를 가져오고 싶다면

git checkout -t <branch name>

브랜치를 가져온 브랜치 또는 기존 브랜치로 전환한다.

git checkout <branch name>