36
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Git LFS で次のエラーメッセージが出たときの一発対処法:Encountered 3 file(s) that should have been pointers, but weren't:

Last updated at Posted at 2018-11-12

git-lfs 使ってるディレクトリをチェックアウトしたり、ブランチ移動してたりするとたまにこうなる

Encountered 1 file(s) that should have been pointers, but weren't:
	Assets/xxx.png

チーム内に git-lfs 有効にしてない人がいたり、たまたまマージのタイミングでポインタになってないファイルがあるのが原因です。

TL;DR;

git update-index --assume-unchanged -- 対象のファイル

# 量が多いとき
git status -s | cut -c 4- | xargs git update-index --assume-unchanged

根本解決

.gitattributes では git-lfs 対象なのにポインタになってないファイルがあるのが原因です。
まとめて LFS 化しましょう。

rm .git/index && git reset
36
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
36
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?