即使没有冲突,Git pull也不会快速合并 [英] Git pull doesn’t fast-forward merge, even though there are no conflicts

查看:390
本文介绍了即使没有冲突,Git pull也不会快速合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚从远程仓库的主分支执行 git pull 到当前通过命令行进行的分支中。

I just performed a git pull from my master branch on a remote repo into the branch I'm currently working on locally via the command line.

意外地Vim打开了。我退出了Vim。
在此之后,我检查了 git status ,它提供了以下信息:

Unexpectedly Vim opened. I quit Vim. Following this, I checked git status which provided the following info:

On branch vod_playlists_my_list_title
All conflicts fixed but you are still merging. 
(use "git commit" to conclude merge)

以及3个文件的列表提交。

along with a list of 3 files to commit.

但是,我没有解决任何冲突。看看这些文件,我预料会发生快速合并。

However, I didn't resolve any conflicts. Looking at the files, I would have expected a fast-forward merge to have occurred.

想知道我在Vim中错过了什么或应该做什么......?

Wondering what I've missed or should have done in Vim...?

推荐答案

发生了什么



当您执行 git pull ,它进行了合并。由于它没有任何冲突,它试图创建一个新的合并提交。

What happened

When you performed git pull, it made a merge. As it didn't have any conflicts, it tried to create a new merge-commit.

因此,它打开Vim编写提交消息。
然后你退出Vim而不保存,留下提交信息为空。

As such, it opened Vim to write a commit message. You then quit Vim without saving, leaving the commit message empty.

Git拒绝了空的提交,这会将提交中的所有内容添加到分段中区域,但提交仍然没有完成。

Git rejected the empty commit, which left you with everything in the commit added to the staging area, but the commit still undone.

您只需要执行 git commit ,输入一条消息,然后保存&退出:wq

You just need to do git commit, enter a message, and save & quit with :wq

这篇关于即使没有冲突,Git pull也不会快速合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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