You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E325: ATTENTION
Found a swap file by the name ".git/.MERGE_MSG.swp"
owned by: work dated: Mon May 17 11:51:29 2021
file name: ~work/oxp_works/.git/MERGE_MSG
modified: no
user name: work host name: yz-higo-fe-fex05.lehe.com
process ID: 6276 (still running)
While opening file ".git/MERGE_MSG"
dated: Mon May 17 12:23:09 2021
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/MERGE_MSG"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".git/.MERGE_MSG.swp"
to avoid this message.
场景
当我们 pull 代码时,可能会出现这个问题:
再点击一下就会出现:
这个是因为 git pull 是 fetch+Merge 的结合,本地可能有需要合并的东西(即使没有真的代码冲突)。
原因:
两种情况会出现这这种问题:
1.如果远程分支超前于本地分支,并且本地也没有commit操作,此时pull会采用’fast-forward’模式,该模式不会产生合并节点,也即不产生"Merge branch ‘master’ of …"信息。
2.如果本地有commit提交,此时若存在冲突,pull拉取代码时远程和本地会出现分叉,会进行分支合并,就会产生"Merge branch ‘master’ of …"信息。
解决方法:
自动合并:使用 git pull --rebase 来拉取代码
or
手动合并一下。
The text was updated successfully, but these errors were encountered: