본문 바로가기
Dev/CS

[Git] git branch --set-upstream-to 에러

by jusep 2024. 7. 10.
$ git pull

을 했더니

 

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> main

이런 에러가 나왔다. 
로컬에 있는 브랜치가 원격저장소의 어떤 브랜치를 참조할지 몰라서 나오는 에러이다

 

 

$ git branch --set-upstream-to=origin/main main

브랜치를 설정해주고 

 

$ git branch -vv

로 확인해보니

* main e8b6723 [origin/main: behind 1] automatic data import

잘 수정이 된거 같다.

$ git pull

다시 pull을 하니 잘 실행된다. 

댓글