여러 브랜치를 사용하면서 한동안 사용하지 않았던 브랜치로 checkout한 뒤, $ git status로 상태를 확인해보니 아래와 같이 나왔다.
On branch source
Your branch is based on 'Origin/master', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
해당 Error는 현재 local branch가 이미 삭제된 원격 branch(origin/master)에 있어야 하는데 해당 자리에 없어서 발생하는 에러이다.
$ git branch --unset-upstream
위 명령어로 데이터를 지우지 않고 local로만 링크를 삭제하며 언제든지 다시 연결할 수 있다.
➕ 추적 브랜치
$ git branch --set-upstream-to origin/브랜치명
$ git branch -v
$ git branch --unset-upstream