Web + Life Hack

〜True But Useless〜

【Git】git add .で見慣れないエラーに困った方に見てほしい。


git addをした際、以下の様なエラーが発生しました。

fatal: Unable to create '/home/g08m11/rails/current/.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.


ロックが解除されていなかったことが問題だったみたいなので以下のコマンドを実行しました。

 rm /home/g08m11/rails/current/.git/index.lock

参考にしたサイトではpullで発生したらしいのですが、
addでも発生したので、同様な問題が発生した方に見て頂けたら幸いです。


参考サイト:
http://nonoswitch.hatenablog.com/entry/2012/11/17/225702