본문 바로가기

Programming Logs/Git

[Git sourceTree] reference broken

sourcetree 를 사용중에 fetch가 안되는 현상이 발생했다 ㅇㄴ

 

 

초기에는 stack overflow를 참고하여 시도하였다

1. git gc --prune=now

INPUT>git gc --prune=now

error: bad ref for .git/logs/refs/remotes/origin/Dev
fatal: bad object refs/remotes/origin/Dev

 

FAIL

 

2. 

INPUT>mv .git/refs/remotes/origin/HEAD /tmp

INPUT> git gc
fatal: bad object refs/remotes/origin/Dev
error: failed to run repack

 

FAIL

 

3.
INPUT> git remote set-head origin --auto
origin/HEAD set to master
INPUT> git gc
fatal: bad object refs/remotes/origin/Dev
error: failed to run repack

 

FAIL

 

 

그러다가 이건 아니다 싶어서 추가적인 구글링을 통해 나와 같은 증상이신 분을 찾았다 

 

4.

INPUT> rm .git/refs/remotes/origin/dev
INPUT> git fetch
From https://dev.azure.com/***/_git/***
 * [new branch]      Dev        -> origin/Dev

 

SUCCESS

 

 

-방끗-

 

 

---

ref

---

 

https://stackoverflow.com/questions/2998832/git-pull-fails-unable-to-resolve-reference-unable-to-update-local-ref

 

git pull fails "unable to resolve reference" "unable to update local ref"

Using git 1.6.4.2, when I tried a git pull I get this error: error: unable to resolve reference refs/remotes/origin/LT558-optimize-sql: No such file or directory From git+ssh://remoteserver/~/mis...

stackoverflow.com

https://burning-camp.tistory.com/20

 

[Git] Sourcetree fetch 오류 (reference broken)

증상 Sourcetree 에서 fetch 를 하던중 오류 발생했다. unable to resolve reference 'refs/remotes/origin/master': reference broken 이전에도 다른 브랜치들의 최신화를 위해 패치를 진행할때 저런 오류가나서..

burning-camp.tistory.com