E325:注意通过名称“.git / .COMMIT_EDITMSG.swp”找到交换文件。 [英] E325: ATTENTION Found a swap file by the name ".git/.COMMIT_EDITMSG.swp"

查看:2200
本文介绍了E325:注意通过名称“.git / .COMMIT_EDITMSG.swp”找到交换文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在一个团队工作了近一年了。使用github / git来拉取和推送更改一直很容易:

  git pull 
git add。
git commit -a -mmy work desc
git push

直到最近,这一直运行良好。现在无论如何,如果其他人推动了,每当我尝试拉时,我都会收到以下消息:

  E325:注意
找到一个名为.git / .COMMIT_EDITMSG.swp的
的交换文件:X日期:Wed Jan 23 16:01:06 2013
文件名:〜X / Sites / mysite /.git/COMMIT_EDITMSG
修改:否
用户名:X主机名:X-2.local
进程ID:77109
打开文件.git / COMMIT_EDITMSG
日期:2013年1月24日16:22:48
比交换文件更新!

(1)另一个程序可能正在编辑同一个文件。
如果是这种情况,请注意不要在进行更改时最终得到同一文件的两个
不同实例。
退出,或继续谨慎操作。

(2)此文件的编辑会话崩溃。
如果是这种情况,请使用:recover或vim -r .git / COMMIT_EDITMSG
来恢复更改(请参阅:帮助恢复)。
如果您已经这样做了,请删除交换文件.git / .COMMIT_EDITMSG.swp
以避免此消息。

交换文件.git / .COMMIT_EDITMSG.swp已经存在!
[O] pen只读,(E)Dit无论如何,(R)ecover,(D)elete它,(Q)Uit,(A)bort:

每次没有失败时都会发生这种情况。我最终可以通过插入一条消息来解决这个问题,保存并重新发布,但这是一个痛苦。任何想法,为什么这种情况继续发生,可以做些什么?

谢谢

解决方案

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

  git rm .git / .COMMIT_EDITMSG.swp 

将文件从存储库中删除。 / p>

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 -a -m "my work desc"
git push

That has always worked fine until recently. Now no matter what, if someone else has pushed, whenever I try to pull I get this message:

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:

This happens every time w/o fail. I can eventually get past this by inserting a message, saving and recommitting but it's a pain. Any idea why this keeps happening and what can be done?

Thanks

解决方案

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.

这篇关于E325:注意通过名称“.git / .COMMIT_EDITMSG.swp”找到交换文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆