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 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x