In git 1.7.10, the git developers decided merge commits could be made too easily. As explained in this blog post, forcing the interactive commit message behavior should make those commit messages more detailed and could reduce the overall frequency of unnecessary merges.

You can use the --no-edit flag to avoid this behavior, but, well, don't. Merge commits, like any commits to history, should be well constructed. Your history should be nothing but useful.

Answer from Christopher on Stack Overflow
🌐
Git
git-scm.com › docs › git-pull
Git - git-pull Documentation
The <key-id> argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. --no-gpg-sign is useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign. ... In addition to branch names, populate the log message with one-line descriptions from at most <n> actual commits that are being merged.
Discussions

If git pull is essentially git fetch + git merge, why does it not ask for a merge commit message
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: Limiting your involvement with Reddit, or Temporarily refraining from using Reddit Cancelling your subscription of Reddit Premium as a way to voice your protest. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnprogramming
3
0
June 19, 2023
How to make 'git pull' take a message? - Stack Overflow
Well, there might be some sort of the solution: you could set a script that returns a predefined text (a merge commit message) as a system editor during git pull with an EDITOR environment variable 2017-08-01T16:57:42.077Z+00:00 More on stackoverflow.com
🌐 stackoverflow.com
merge - How to git pull with custom commit message? - Stack Overflow
I'm in a big problem. I was in a new working environment and working with a team. They are pushing straight to the master branch for new features while I used to work in a separate branch myself, o... More on stackoverflow.com
🌐 stackoverflow.com
How to get commit message on pull_request workflow?
- name: Checkout Commit uses: ... "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT" Beta Was this translation helpful? Give feedback. ... There was an error while loading. Please reload this page. Something went wrong. There was an error while loading. Please reload this page. ... Thanks for the head start here!! My ref was going towards a pull request so ... More on github.com
🌐 github.com
3
10
🌐
GitHub
github.com › jupyterlab › jupyterlab-git › issues › 1071
Allow writing a commit message after git pull · Issue #1071 · jupyterlab/jupyterlab-git
January 26, 2022 - When I git commit to some branch and then pull changes, all the files that were modified (vs. my local repo) go into the staging area. The is is because the git pull operation did not provide a commit message (details here).
Author   jupyterlab
🌐
Reddit
reddit.com › r/learnprogramming › if git pull is essentially git fetch + git merge, why does it not ask for a merge commit message
r/learnprogramming on Reddit: If git pull is essentially git fetch + git merge, why does it not ask for a merge commit message
June 19, 2023 -

If I manually do git merge, it'll open up an editor for me to modify/save the merge commit message. But when I do git pull, it just works. Why?

Edit: here's my guess, lmk if I'm on the right track. Before, I wasn't seeing a message when doing git pull because the changes were such that it was just a fast-forward pull. So no merge was even necessary; in essence an empty merge comit message was used (which I'm guessing means no commit actually occurred). When doing an actual merge, of course a merge is happening, so it prompts you to make a merge commit message. And then when doing a pull that isn't as straightforward, i.e. a merge conflict occurs, it will make you fix the conflict, and then commit that change, which serves as the merge commit message.

Top answer
1 of 3
1
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: Limiting your involvement with Reddit, or Temporarily refraining from using Reddit Cancelling your subscription of Reddit Premium as a way to voice your protest. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2 of 3
1
Interesting question which I don't have a great answer for (our Git experts will chime in). But, git fetch is more of pull to a local copy and git merge is more of a push from local to central. I mean, that's not totally accurate, so to back up, the centralized model of version control (i.e., SVN) had a central repository which people would share and be, effectively, the source of record. When you check it out, you have a local copy, but that copy isn't considered a repository in centralized versions. So when you check in your code, you are merging local to central. When you do an update, you are merging the central version (often called trunk) to yours. Having said that, in Git, which is decentralized, you can pull from some other repository. Since these aren't your changes, it should have a merge commit message. You didn't write the changes, and therefore, adding another one might seem superfluous?
🌐
Oddbit
blog.oddbit.com › post › 2019-06-14-git-etiquette-commit-messages
Git Etiquette: Commit messages and pull requests :: blog.oddbit.com
June 14, 2019 - Within your pull request, there should be a single commit for each logical change. For example rather than: ... You should use git commit --amend or git rebase, as discussed earlier, to keep your commits topical and organized.
🌐
University of Chicago
classes.cs.uchicago.edu › archive › 2016 › fall › 12100-1 › git-faq.html
Git FAQ — CS121 Main Page 1.0 documentation
Please, fix them up in the work tree, and then use 'git add/rm <file>' as appropriate to mark resolution, or use 'git commit -a' This error message means that, at some point in the past, you did a git pull that included code that conflicted with the code on your machine.
Top answer
1 of 2
2

So I need to change my merge commit message produced by git pull to another message.. Is it possible?

Yes. After the pull, if a merge commit was created, say

git commit --amend

You will be asked for a replacement commit message.

However, you should have done this together with the pull, by saying

git pull --edit

And yes, I know that git pull is a shorthand for git fetch and git mergeI read from another similar question on SO but I just can't grasp that

Grasp it. You never need to say pull; it is confusing and dangerous. To merge master into the branch you are on, say

git fetch
git merge origin/master 

Again, to avoid having to rewrite the commit message later, say

git fetch
git merge --edit origin/master 

You asked: "What is the safest command to fetch and merge with custom message?" That.

(It is also possible to configure your Git so that a merge commit always offers you the chance to edit its message. I prefer it that way. Recent Git versions are set up this way by default; you might be using a somewhat outdated Git, else the problem would never have arisen.)

2 of 2
1

The easiest would be to do git pull as usual, then run :

git commit --amend -m"New commit message"

This will rewrite the last commit message that was commited.

Be aware that you should not use this if you already pushed that particular commit, because this will then need you to do git push --force which is usually bad practice.

Note that you can create a new branch for your current changes before doing the merge with master.

Find elsewhere
🌐
GitHub
docs.github.com › en › pull-requests › committing-changes-to-your-project › creating-and-editing-commits › changing-a-commit-message
Changing a commit message - GitHub Docs
In each commit message file that opens, enter the new message, then save and close the file. Force push the rewritten history. ... See Interactive mode in the Git manual.
🌐
Delft Stack
delftstack.com › home › howto › git › git pull specific commit
How to Pull Specific Commit From Git Repository | Delft Stack
March 11, 2025 - Each commit in a Git repository has a unique identifier, known as a commit hash. This hash is a 40-character string that allows you to reference specific changes made in the repository. You can find the commit ID by running the command: ... This command displays a log of all commits, showing their hashes, authors, and commit messages. Once you have the commit ID you want to pull...
🌐
GitHub
github.blog › home › changelogs › new options for controlling the default commit message when merging a pull request
New options for controlling the default commit message when merging a pull request - GitHub Changelog
March 22, 2025 - From repository settings, a maintainer or admin can choose the default format for commit messages produced when merging pull requests: This selection is used to form a default commit message that gets presented to users on the pull request page when merging a pull request.
🌐
Medium
tsuyoshiushio.medium.com › change-a-commit-message-that-is-already-merged-by-pull-request-on-a-protected-branch-on-github-c350406720c7
Change a commit message that is already merged by pull request on a protected branch on GitHub | by Tsuyoshi Ushio | Medium
May 6, 2020 - $ git log commit 0456ee900a4cb...hiUshio-patch-1Revert "Can't change directory" Change the commit message. You can use git commit --amend for the latest commit change....
🌐
Medium
medium.com › mindorks › what-is-git-commit-push-pull-log-aliases-fetch-config-clone-56bc52a3601c
What is git commit, push, pull, log, aliases, fetch, config & clone | by Amit Prajapati | MindOrks | Medium
November 17, 2019 - The git command is git commit -m “commit message” taking all the changes in the Staging Area, wraps them together and puts them in your Local Repository. A commit is simply a checkpoint telling git to track all changes that have occurred ...
🌐
Medium
frankgwarman.medium.com › the-first-pull-commit-and-push-with-git-fb620b0e630b
The first Pull, Commit, and Push with Git! | by Frank Warman | Medium
June 20, 2023 - Now that the files are staged to be committed. We can use the command “git commit -m “(message)”.
🌐
Reddit
reddit.com › r/github › pull request/commit message practices to follow for first time pr
r/github on Reddit: Pull request/commit message practices to follow for first time PR
January 27, 2025 -

Hi all,

So today I submitted my first bug in a public project/repo, I also put the fix in the report (it was just a documentation bug, and I realised the right command I had to use). Then the person asked me to submit a pull request?

So... I've never done that before, or forked anything to be honest. I am a nervous fellow, so I want to make sure I don't mess up the pull request. I've already forked the master branch, made the changes, but now I have to write a commit message / extended description.

Does anyone have any advice/general practices I should follow? I've googled a bunch and tried to keep the initial message short and concise ("Fixed command path"), but I'm not sure what to put for the extended description considering it's just changing two lines of text.

It's also been a couple hours since they requested the PR, I hope they don't think I've spent hours on the PR (even though I might've have).

Thanks!!

🌐
Code Like A Girl
code.likeagirl.io › introduction-to-using-git-in-terminal-7a8d8a6d1e2b
Introduction to Using git in Terminal | by Ai-Lyn Tang | Code Like A Girl
August 27, 2019 - But best practice with that would be to squash all my commits that say WIP before submitting a pull request. Shrug. Too complicated for a newbie like me! (Update: I learnt how to squash commits! Read on to see how.) Thanks to this article which says “yeah, force pushing is bad but hey, if it’s just you out there, whatevs” (scroll to option 2). This gave me the confidence to go forth. Join Medium for free to get updates from this writer. ... Commit all the changes in one commit. Start the commit message with “WIP”, e.g. git commit -m "WIP Fix up sorting with minimum value as last index".
🌐
Graphite
graphite.com › guides › git-add-commit-push
Git add, commit, and push - Graphite
Running git log will show your new commit at the top: ... This sends your commits to the main branch on the remote repository. After pushing, teammates can pull these changes and benefit from your latest updates. Commit frequently: Commit small units of work often. This makes it easier to understand what changed and why. Write descriptive commit messages...