I use this command:
git merge --commit -m="Automatic commit" --progress my_branch/master
if [ $? != 0 ]; then
echo "Merge fail"
fi
The merge was successful and do not produce any conflict.
The git command output is:
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 it show: stopped before committing as requested? I want it commit if do not exist any conflict.
Any idea to make it automatic?
Yes you can being on a new branch doesn't stop you from using a commit.
yes ..you need to commit MERGE STATEMENT.
stopped before committing as requested
That message should only happen when using the --no-commit
option.
As illustrated in "Mastering Git subtrees", a git merge --squash
would also produce the same message.
So unless (perhaps) you might have a merge already in progress, you should not see that message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With