1
1

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 1 year has passed since last update.

gitで.git/index.lock: File exists.というのエラーが出た時の対処方法。

Posted at
Unable to create 'C:・・・・・・.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

と表示されたので、エラーを読んでみると、index.lockを削除すればいいらしいです。
でも、削除の仕方がわからなかったので、調べてみると、windowsでは、

del .git\index.lock

とコマンドを打てばよいとのこと。実際にやってみるとできたので、もし同じところで詰まっているなら、参考にしてほしいです。

Macの場合は、

rm .git/index.lock

らしいです。

1
1
1

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?