E325: ATTENTION Found a swap file by the name ".git/.COMMIT_EDITMSG.swp"

I had the same problem and for some reason using git rm didn't work for me.

To solve the problem, I simply removed the file instead: $ rm .git/.COMMIT_EDITMSG.swp and that fixed the problem.


I tried deleting the message but it fails and complained that I do not have such file. So, I added a commit Message -m when doing git commit -m and the warning doesn't show any more .


Unless you need .git/.COMMIT_EDITMSG.swp for some other purpose, you can use:

git rm .git/.COMMIT_EDITMSG.swp

to remove the file from the repository.

Tags:

Git

Github