我已經和一個團隊合作了近一年了。使用github/git來拉取和推送更改總是很容易:E325:注意通過名稱「.git/.COMMIT_EDITMSG.swp」找到交換文件。
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:
每次沒有失敗時會發生這種情況。我最終可以通過插入一條消息來解決這個問題,保存並重新發布,但這是一個痛苦。任何想法爲什麼這種情況繼續發生和可以做什麼?
感謝
你是否做了所有沒有'm'國旗的提交? – alex
我這樣做,那是不好的? – AnApprentice
當你拉扯時,或者拉扯後提交時,你會得到這條消息嗎? –