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

后端 未结 4 919
-上瘾入骨i
-上瘾入骨i 2020-12-14 06:01

I\'ve been working with a team for almost a year now. It\'s always been easy to use github/git to pull and push changes using:

git pull
git add .
git commit          


        
相关标签:
4条回答
  • 2020-12-14 06:26

    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.

    0 讨论(0)
  • 2020-12-14 06:33

    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.

    0 讨论(0)
  • 2020-12-14 06:34

    You simply need to commit the changes if after a merge from another branch you this swap error message. I git added - green files not committed. I committed the files - then done.

    0 讨论(0)
  • 2020-12-14 06:48

    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 .

    0 讨论(0)
提交回复
热议问题