我已经和一个团队一起工作了将近一年。使用 github/git 来拉取和推送更改总是很容易的:
git pull
git add .
git commit -a -m "my work desc"
git push
直到最近,这一直很好。现在无论如何,如果其他人推了,每当我尝试拉时,我都会收到以下消息:
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:
每次没有失败时都会发生这种情况。我最终可以通过插入一条消息、保存并重新提交来解决这个问题,但这很痛苦。知道为什么这种情况不断发生以及可以做些什么吗?
谢谢