How do I commit automatically after a successful merge?

I use this command:

git merge --commit  -m="Automatic commit" --progress my_branch/master
if [ $? != 0 ]; then
    echo "Merge fail"
fi

The merger was successful and did not cause conflict.
The output of the git command:

Automatic merge went well; stopped before committing as requested
fatal: You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.

Why is this shown: stopped before committing as requested ? I want him to fix if there is no conflict.

Any idea to do this automatically?

+5
source share
1 answer
 stopped before committing as requested

This message should only appear when using the parameter --no-commit.
As shown in Mastering Git Subtrees , it will also display the same message. git merge --squash

So, if (possibly) you already have a merge, you should not see this message.

0
source

All Articles