Why does git merge origin/master not generate a commit message?

Viewed 171

As I know that the git pull origin master is kinda alias of git fetch origin followed with git merge origin/master. However, when using git merge command for merging a change from other branch to master, there is usually an automatically generated commit message.

Question: why does git merge origin/master not generate a merge commit message automatically like in the usual case?

1 Answers

Check the git-pull documentation:

--ff
--no-ff
--ff-only

Specifies how a merge is handled when the merged-in history is already a descendant of the current history. --ff is the default unless merging an annotated (and possibly signed) tag that is not stored in its natural place in the refs/tags/ hierarchy, in which case --no-ff is assumed.

--ff is used as default, which resolves the merge as a fast-forward if possible, and creates a merge commit when not possible.

Related