gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 00:55:38 28 4
gpt4 key购买 nike

我已经在一个团队中工作了将近一年。使用 github/git pull 和推送更改总是很容易:

git pull
git add .
git commit -a -m "my work desc"
git push

直到最近,它一直运行良好。现在无论如何,如果其他人已经推送,每当我尝试 pull 时,我都会收到此消息:

E325: ATTENTION
Found a swap file by the name ".git/.COMMIT_EDITMSG.swp"
owned by: X dated: Wed Jan 23 16:01:06 2013
file name: ~X/Sites/mysite/.git/COMMIT_EDITMSG
modified: no
user name: X host name: X-2.local
process ID: 77109
While opening file ".git/COMMIT_EDITMSG"
dated: Thu Jan 24 16:22:48 2013
NEWER than swap file!

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r .git/COMMIT_EDITMSG"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".git/.COMMIT_EDITMSG.swp"
to avoid this message.

Swap file ".git/.COMMIT_EDITMSG.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

每次没有失败时都会发生这种情况。我最终可以通过插入一条消息、保存并重新提交来解决这个问题,但这很痛苦。知道为什么这种情况一直发生以及可以做什么吗?

谢谢

最佳答案

除非出于其他目的需要 .git/.COMMIT_EDITMSG.swp,否则您可以使用:

git rm .git/.COMMIT_EDITMSG.swp

从存储库中删除文件。

关于git - E325 : ATTENTION Found a swap file by the name ".git/.COMMIT_EDITMSG.swp",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14513349/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com