Copy & Paste Engineer

【Git】 would clobber existing tag を解決する

【Git】 would clobber existing tag を解決する

git pull を行ったら以下のようなエラーが発生

! [rejected] tag -> tag (would clobber existing tag)

原因

ローカルリポジトリとリモートリポジトリのタグの名前が重複していることが原因。

対処

以下のコマンドを使用するとリモートリポジトリのタグでローカルリポジトリを更新します。

git fetch --tags -f

参考