エラー

git add -A を実行した時にクラッシュ

もう一度同じ操作をしようとしても index.lock がすでに存在するため 以下のようなメッセージが出てエラーを吐いてしまう

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 add しようとしている中に不正なファイルがありそう

対策

一時的に戻す方法としては以下

rm .git/index.lock

git reset

不必要なファイルは .gitignore で避ける

今回の場合は virtualenv で作成されたものを git add -A しようとして発生した のでこれを使った