git: error: cannot lock ref, error: cannot lock ref

1378 단어 gitGitHub
실행git pull 시 다음과 같은 오류가 발생합니다.
$ git pull
error: cannot lock ref 'refs/remotes/origin/branch': 'refs/remotes/origin/branch/repair' exists; cannot create 'refs/remotes/origin/branch'
From git.microsoft.com:office2019/excel
 ! [new branch]        branch      -> origin/branch  (unable to update local ref)
error: some local refs could not be updated; try running
 'git remote prune origin' to remove any old, conflicting branches

해결 방법은 제시에 따라 실행하는 것이다.
git remote prune origin

우리는 우리의branch가push->open->approve->merge에서 대체적으로 이 몇 가지 과정을 거쳐야 한다는 것을 알고 있다. 우리의branch가merge에서 master에 도착한 후에github의branch를 삭제할 것을 요구하지만, 우리의branch는 일반적으로 아무도 관여하지 않는다. 시간이 길어지면 로컬의branch는 한 무더기로 쌓인다. 이 명령은 로컬에서 아직 삭제하지 않은 branch를 함께 제거하는 것이다.

좋은 웹페이지 즐겨찾기