STERFIELD
開発ナレッジ2018.09.15

Gitのindexに関するエラー対応

Gitのindexに関するエラー対応

git status
fatal: index file smaller than expected

念のため、一旦コピーしておきましょう。

対処方法1

対処方法2

もしsubmoduleがある場合か修正したファイルを維持したい場合なら

対処方法3

submoduleのフォルダ内の.gitなら

git status
fatal: index file smaller than expected
fatal: ‘git status –porcelain=2’ failed in submodule xxx/xxx/xxx

fatal: Unable to create ‘/xxxx/.git/index.lock’: File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

対処方法

.git/index.lockを削除します。

WRITER

スターフィールド編集部

この著者の記事を見る

CONTACT

記事の内容について
相談したい方へ

実際の進め方は、状況を伺ってからご提案します。

2営業日以内にご返信します
資料ダウンロード無料相談に申し込む