0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

fatal: could not open '.git/COMMIT_EDITMSG': Operation timed out

0
Posted at

はじめに

git commitの際に以前までは出なかったエラーが出てきたので原因と解決策を書きます。

問題

git commitの際に以下のエラーが出る。

fatal: could not open '.git/commit_editmsg': operation timed out

原因と解決策

プロジェクトのファイルをmacの/Desktop配下に置いていたのが原因みたいでした。macでは/Desktop配下に置いたファイルの変更をリアルタイムで監視しているため、git commit時に内部のファイル書き込みが行われたタイミングですぐに同期しようとするため、gitの内部ファイルへのアクセス権の競合が起きてタイムアウトしてしまったみたいです。

なのでプロジェクトのファイルを/Desktop以外の別の箇所に置くことで直りました。下に参考記事も貼りましたが、/Desktopにおくとgit以外の環境にも色々悪影響ありそうなので、普段ここで開発している場合は違う場所に移動しておいた方が良さそうです。

おわりに

以前Pythonを使っていた際も急に仮想環境が壊れたりしたことがあったので、その原因もこれだったのかなと思います。

参考

0
0
0

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?