Git pull doesn’t fast-forward merge, even though there are no conflicts
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.
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)
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.
Relatively new to git so wondering what I’ve missed or should have done in Vim…?
2 Solutions collect form web for “Git pull doesn’t fast-forward merge, even though there are no conflicts”
When you performed
git pull, it made a merge. As it didn’t have any conflicts, it tried to create a new merge-commit.
As such, it opened Vim to write a commit message.
You then quit Vim without saving, leaving the commit message empty.
Git rejected the empty commit, which left you with everything in the commit added to the staging area, but the commit still undone.
How to fix it
You just need to do
git commit, enter a message, and save & quit with
You have to commit your changes even if you did not fix any merge due to your non-Fast forward pull (pull=fetch + merge).
no-ff creates a
merge commit and you must run
git commit to commit it.
Here is a demo of how it will look like.