728x90
반응형
질문 : git pull "unable to resolve reference" "unable to update local ref"가 실패합니다.
내가 시도 할 때 자식 1.6.4.2을 사용하여, git pull
나는이 오류가 발생합니다 :
error: unable to resolve reference refs/remotes/origin/LT558-optimize-sql: No such file or directory
From git+ssh://remoteserver/~/misk5
! [new branch] LT558-optimize-sql -> origin/LT558-optimize-sql (unable to update local ref)
error: unable to resolve reference refs/remotes/origin/split-css: No such file or directory
! [new branch] split-css -> origin/split-css (unable to update local ref)
git remote prune origin
시도했지만 도움이되지 않았습니다.
답변
다음을 사용하여 로컬 저장소를 정리하십시오.
$ git gc --prune=now
$ git remote prune origin
man git-gc (1) :
git-gc - Cleanup unnecessary files and optimize the local repository
git gc [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune]
Runs a number of housekeeping tasks within the current repository, such as compressing file revisions
(to reduce disk space and increase performance) and removing unreachable objects which may have been
created from prior invocations of git add.
Users are encouraged to run this task on a regular basis within each repository to maintain good disk
space utilization and good operating performance.
man git-remote (1) :
git-remote - manage set of tracked repositories
git remote prune [-n | --dry-run] <name>
Deletes all stale remote-tracking branches under <name>. These stale branches have already been
removed from the remote repository referenced by <name>, but are still locally available in
"remotes/<name>".
출처 : https://stackoverflow.com/questions/2998832/git-pull-fails-unable-to-resolve-reference-unable-to-update-local-ref
728x90
반응형
'개발관련 > Git' 카테고리의 다른 글
git의 마지막 커밋에 파일을 추가하는 방법 (0) | 2021.11.08 |
---|---|
GitHub에서 오리진과 업스트림의 차이점 (0) | 2021.11.08 |
Git - 'assume-unchanged'과 'skip-worktree'의 차이점 (0) | 2021.11.05 |
Git 리포지토리에서 원격 출처를 제거하는 방법 (0) | 2021.11.05 |
WebStorm Git 리포지토리 세팅 (0) | 2021.11.04 |