GIT error: some local refs could not be updatedとエラーが表示される

ERROR

git pullすると some local refs could not be updatedとエラー

リモートで消されたブランチが手元にあるときにエラーになってしまう。

$ git pull

error: cannot lock ref 'refs/remotes/origin/release': 'refs/remotes/origin/release/v1.3.1' exists; cannot create 'refs/remotes/origin/release'
From ssh://server/git
 ! [new branch]        release    -> origin/release  (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

その時はpruneコマンドを実行すると解消できる

$ git fetch --prune
$ git remote prune origin
0 0
Article Rating
申し込む
注目する
guest

0 Comments
インラインフィードバック
すべてのコメントを見る
0
あなたの考えが大好きです、コメントしてください。x