That's a default merge commit message. It doesn't take anything special to get it - just do any nontrivial merge into master:

- o - o - X (master)
   \     /
    o - o (topic)

The default commit message for commit X will be "Merge branch 'topic'". If you merge into a branch other than master, the default message is "Merge branch '<merged-branch>' into '<branch>'".

I'm not sure why you're asking about "fixing" and "avoiding" this. It's a very reasonable default message for a merge commit. If you'd like a more detailed merge commit message, you're certainly welcome to provide one. (The two primary ways are to use git merge --no-commit followed by git commit, or git merge followed by git commit --amend to edit the message.)

Perhaps you're used to doing only fast-forward merges? (Those are trivial merges, where the commit you're merging has your current branch as ancestor, so all git has to do is move the branch forward through history.) Those don't generate merge commits, so there's no commit message.

(By the way, pushing has nothing to do with this - all it does is copy information from one repo to another. It doesn't ever create commits.)

Answer from Cascabel on Stack Overflow
๐ŸŒ
Git
git-scm.com โ€บ docs โ€บ merge-options โ€บ 2.22.1
no-commit - Git - merge-options Documentation
This option determines how the merge message will be cleaned up before commiting. See git-commit[1] for more details. In addition, if the <mode> is given a value of scissors, scissors will be appended to MERGE_MSG before being passed on to the commit machinery in the case of a merge conflict. ... When the merge resolves as a fast-forward, only update the branch pointer, without creating a merge commit.
Discussions

How to "git merge" without creating a merge commit? - Stack Overflow
Is it possible to do a git merge, but without a commit? "man git merge" says this: With --no-commit perform the merge but pretend the merge failed and do not autocommit, to give the user a chance... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How to exit a git merge asking for commit message? - Unix & Linux Stack Exchange
I'm using git. I did a normal merge, but it keeps asking this: # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic br... More on unix.stackexchange.com
๐ŸŒ unix.stackexchange.com
git - merge branches without commit messages - Stack Overflow
Assuming following "workflow" create branch master add + commit some files create and checkout branch dev edit and commit several times with silly commit messages checkout master merge dev branch ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
February 15, 2013
git merge without commiting - Stack Overflow
I am currently trying to merge 2 branches using git. When I git merge branch, it automatically merges and tries to commit, requiring me to write the commit message in a file named MERGE_MSG. However, More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Reddit
reddit.com โ€บ r/git โ€บ merging branches without committing result
r/git on Reddit: Merging branches without committing result
July 22, 2025 -

Hey y'all,

I'm a bit of a beginner in Git usage and GitHub, so I am having some trouble merging two branches.

I have a repository A (forked from a repository X) on which I made changes. At the same time, other developers have made changes on their own fork of X (let's call it B), more specifically, they created a branch in addition to the fork. I now want to merge these two versions (the branch of B and my own fork A), but ideally I would like to be able to look at all the changes and accepting them one by one (or not).

Basically, this is what I want:

...-o-o-x-------C
        |\     /|
        | A---/ |
         \     /
          B---/

But, I'd like to be able to control exactly which changes get made. Here are the commands I used:

git clone <url to my repo A> A
git clone <url to the other repo B> B
cd A
git remote add B ../B
git fetch B --tags
git merge --squash --allow-unrelated-histories B/main
git reset

Now, I opened VS code, hoping that all the changes would not be committed (as I used --squash, or at least so I thought), but the files have all been changed, some deleted, others created, and I only have the option of syncing the changes to Git. Attached is a screenshot of source control in VS Code showing no changes at all (nor can they be reverted? Or so it seems...)

Thank you for your help.

๐ŸŒ
Medium
medium.com โ€บ @nirbhaysingh281 โ€บ automate-git-branch-merge-without-specifying-a-commit-message-10268ed59cc5
Automate git Branch Merge Without Specifying a Commit Message | by Nirbhay Singh | Medium
July 25, 2024 - Hereโ€™s a simplified version of the script to automate the merge process: #!/bin/bash # Set the names of the branches SOURCE_BRANCH="DevBranch" TARGET_BRANCH="TestBranch" REPO_DIR="/path/to/your/repository" # Navigate to the repository directory cd $REPO_DIR # Ensure you are in the repository directory if [ $? -ne 0 ]; then echo "Failed to navigate to repository directory. Please check the REPO_DIR path." exit 1 fi # Fetch the latest changes from the remote git fetch origin # Check out the target branch git checkout $TARGET_BRANCH # Ensure the target branch was checked out if [ $? -ne 0 ]; th
๐ŸŒ
Tech Junkie
techjunkie.com โ€บ pc โ€บ windows
How to Merge Without Commit in Git - Tech Junkie
September 12, 2019 - What that means is that you can add an additional argument to your Git Merge command (โ€“no commit) to stop the command from automatically activating Git Commit. Your command prompt line should look something like this: ... Of course, depending ...
Find elsewhere
๐ŸŒ
Linux Hint
linuxhint.com โ€บ git-merge-without-auto-commit
Git Merge Without Auto Commit โ€“ Linux Hint
To merge branch without auto commit, commit the changes and move to branch in which you want to merge. Then, use the โ€œgit merge branch --no-commitโ€ command.
๐ŸŒ
Git Scripts
gitscripts.com โ€บ git-merge-without-commit
Git Merge Without Commit: A Quick Guide
April 19, 2024 - This scenario requires manual intervention to resolve the differences before a merge can be completed. ... Performing a "git merge without commit" means that during the merge process, no commit is automatically created to finalize the merge.
๐ŸŒ
Shinglyu
shinglyu.com โ€บ web โ€บ 2018 โ€บ 03 โ€บ 25 โ€บ merge-pull-requests-without-merge-commits.html
Merge Pull Requests without Merge Commits | Shing's Blog
March 25, 2018 - But it only works if there is not ... on your local master, you need to do a rebase on your feature branch before using --ff-only merge....
๐ŸŒ
Position Is Everything
positioniseverything.net โ€บ home โ€บ how to merge without commit in git
How to Merge Without Commit in Git
May 17, 2026 - If you prefer to provide the message directly, use git commit -m "Merge feature/auth into main". GitHub For Devs: Branching Without Confusion | GitHub Projects Made Easy | Merge, Fork & Pull Fast | Version History Like Magic | GitOps Unlocked | Practical guide for devs | Advance teamwork with Git
๐ŸŒ
Git
git-scm.com โ€บ docs โ€บ merge-options โ€บ 2.8.6
Git - merge-options Documentation
To make it easier to adjust such scripts to the updated behaviour, the environment variable GIT_MERGE_AUTOEDIT can be set to no at the beginning of them. ... When the merge resolves as a fast-forward, only update the branch pointer, without creating a merge commit.
๐ŸŒ
Delft Stack
delftstack.com โ€บ home โ€บ howto โ€บ git โ€บ git merge without commit
How to Merge Files Without Auto Commit in Git | Delft Stack
February 26, 2025 - The simplest way to merge without auto commit is to use the --no-commit option with the git merge command. This option allows you to merge changes from another branch while preventing Git from finalizing the merge with a commit.
๐ŸŒ
DEV Community
dev.to โ€บ itzg โ€บ git-merge-without-commit-in-intellij-fdp
Git merge without commit in IntelliJ - DEV Community
January 30, 2021 - By default, using the git merge (not rebase) operation in IntelliJ will immediately create a merge-commit.