2012-12-14 2 views
17

마지막으로 Git 저장소의 master 브랜치에 병합 한 후 저장소를 복제 할 수 없습니다.Git refs/remotes/origin/master가 유효한 객체를 가리키고 있지 않습니다.

 
Cloning into test-repository... 
remote: Counting objects: 126084, done. 
remote: Compressing objects: 100% (28327/28327), done. 
Receiving objects: 100% (126084/126084), 132.63 MiB | 29.30 MiB/s, done. 
remote: Total 126084 (delta 96101), reused 126078 (delta 96095) 
Resolving deltas: 100% (96101/96101), done. 
error: refs/remotes/origin/master does not point to a valid object! 
error: Trying to write ref refs/heads/master with 
     nonexistant object 951aca8051823b2f202d30c9cb05401ef17618c6 

어안, 저장소 호스팅 도구,보고 :

 
Unable to fetch from remote repository: 
/var/atlassian/application-data/fisheye/managed-repos/MYREPONAME.git 
error: unable to find 0d998c99b6d01e8aabca72b1934802acf90b8fc9, 
fatal: object 0d998c99b6d01e8aabca72b1934802acf90b8fc9 not found 

마지막 마스터 분기에 저장소에 커밋 것은 : 내가 시도

 
commit 0d998c99b6d01e8aabca72b1934802acf90b8fc9 
Merge: a6ea4b3 1f373a9 
Date: Fri Dec 14 13:57:24 2012 +0200 

Merge branch 'new_error_code' 

:

cd /var/atlassian/application-data/fisheye/managed-repos/MYREPONAME.git 
git gc 
git fsck --full 
git reflog expire --expire=0 --all 
git update-ref 
git gc --aggressive 

다음 질문은 내 경우 도움이되지 :

답변

29
git gc 
git fsck --full 
git reflog expire --expire=0 --all 
git update-ref -d 0d998c99b6d01e8aabca72b1934802acf90b8fc9 
git gc --aggressive 
git remote update --prune 

!

+0

너무 느리고 복제품보다 비용이 많이 듭니다. – suiwenfeng

+3

@Matt는 여기서 일어나는 일을 더 자세히 설명 할 수 있습니까? – andi

+0

전혀 설명이 없습니다. 미래에 더 많은 사람들이 이것을 필요로한다고 생각해야합니다. \ – PlayHardGoPro

1

당신은 할 수 있습니다 :

git reflog master 

이 당신에게 마지막으로 알고있는 위치의 목록을 줄 것이다 주인이 지적했다.

이 당신이

git branch temp [email protected]{1} 

그리고 체크 아웃 온도, 즉 마스터의 이전 버전으로 임시 브랜치를 생성하고 적절한 순서에 있는지 볼 수 있습니다 알게되면. 거기에 아무것도 표시되지 않으면 이전에 수행 한 명령 (reflog 삭제, 매달린 커밋 삭제 등)으로 복구 할 수있는 모든 방법이 사라질 수 있습니다.

관련 문제