Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do an automatic commit after successful merge?

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?

like image 538
Rodrigo Avatar asked Mar 26 '12 21:03

Rodrigo


People also ask

Can I still add commit on branch after created merge request?

Yes you can being on a new branch doesn't stop you from using a commit.

Do I have to commit after merge?

yes ..you need to commit MERGE STATEMENT.


1 Answers

 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.

like image 189
VonC Avatar answered Oct 03 '22 15:10

VonC