Why do I see a git merge prompt message keep popping up everytime after I do git pull
?
I am 100% sure that there is nothing is merging.
It so annoying, does anybody know how to stop it ?
Why do I see a git merge prompt message keep popping up everytime after I do git pull
?
I am 100% sure that there is nothing is merging.
It so annoying, does anybody know how to stop it ?
Why do I see a git merge prompt message keep popping up everytime after I do git pull ?
Because git pull
is essentially a fetch
followed by a merge
, and the default behavior of merge
is to automatically commit the result.
You can avoid the editor by supplying the --no-edit
option, in which case you'll get an automatically generated message for your commit.
If I'm not mistaken, this means a fast-forward merge was not possible. Usually this happens when there are commits in master that are not present in origin's master branch (or whatever branch you are pulling from/merging to)
In that case history, after the fetch done by git-pull, would look like the following:
origin/master
|
-- A -- B -- C -- D -- E
\
+-- D'
|
master
To bring changes D and E into the local master branch, git needs to introduce a merge commit, M (which records the parents and solves potential merge conflicts), and that's why it's asking you for a messsage.
History after the merge looks like in the following graph:
origin/master
|
-- A -- B -- C -- D -- E
\ \
+-- D' -- M
|
master
This is the default behaviour as far as I can tell. However, git-pull documentation says:
The --no-edit option can be used to accept the auto-generated message (this is generally discouraged).
DISCLAIMER: I don't have git available right now to test it :(