AR ホームベーカリー

オイラのアウトプット用ホームベーカリー!

error: some local refs could not be updated; try running

git pull したらエラーが。

❯ git pull

...

error: cannot lock ref 'refs/remotes/origin/feature/sso': 'refs/remotes/origin/feature/sso/add_permissions_api' exists; cannot create 'refs/remotes/origin/feature/sso'
 ! [new branch]          feature/sso                 -> origin/feature/sso  (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 する。

❯ git remote prune origin
Pruning origin

...

 refs/remotes/origin/HEAD has become dangling!

なおった。 ちなみにこのリポジトリは開発に参加していないので、多分リモート側でなんかやった結果、前回との差分で情報が死んだ気がする。 俺は悪くねえ!ヴァン先生が(ry

参考

qiita.com

www.r-staffing.co.jp