Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リンクされた回答に基づいて、インデックスに追加したものはすべて、次のgit add方法で回復できるはずです。
git add
git fsck --lost-found
.git/lost-found/otherこれにより、インデックスに追加したがディレクトリにコミットされていないファイルが作成されます。ファイル名は代わりに SHA になるため、どれがどれであるかを知るために 1 つずつ内部を調べる必要があります。
.git/lost-found/other