[Git] Error - there is no tracking information for the current branch 에러.

하쮸·2025년 8월 9일
0

Error 또는 Why & How

목록 보기
22/43

1. 원인.

there is no tracking information for the current branch

  • 이 메시지는 현재 로컬의 main 브랜치가 원격 저장소의 어떤 브랜치와도 연결(추적, tracking)되어 있지 않아서 발생하는 에러.
    • git pull할 때 어느 원격 브랜치와 병합할지 모르기 때문에 이렇게 나오는거임.

  • 로컬 저장소 (Local Repository)
    • 내 컴퓨터에 있는 Git 저장소.
  • 원격 저장소 (Remote Repository)
    • 네트워크나 인터넷 상에 있는 Git 저장소.

2. 해결 방법.

  • 원격 브랜치와 로컬 브랜치 연결하기 (tracking 설정)
git branch --set-upstream-to=origin/main main
  • 로컬 main 브랜치가 원격 저장소 origin의 main 브랜치를 추적하도록 설정하는 명령.

  • 이후 git pull 명령어를 실행하면 자동으로 원격 origin/main 브랜치와 동기화됨.

git pull

3. 참고

profile
Every cloud has a silver lining.

0개의 댓글