Scoop update時にエラー「error: Your local changes to the following files would be overwritten by merge」が発生した場合の対処法

Scoop update時にエラー「error: Your local changes to the following files would be overwritten by merge」が発生した場合の対処法

Scoop update時にエラー「error: Your local changes to the following files would be overwritten by merge」が発生した場合の対処法を記述してます。

環境

  • OS windows 11 home
  • docker 20.10.12

エラー全文

アップデート時に発生

> scoop update

Updating Scoop...
error: Your local changes to the following files would be overwritten by merge:
        buckets.json
Please commit your changes or stash them before you merge.
Aborting
Update failed.

対処法

エラーがでている対象のファイルを「checkout」する。

> cd C:\Users\ユーザー名\scoop\apps\scoop\current 

> git checkout buckets.json
Updated 1 path from the index

自分はこれでupdateできるようになりました。