How to use the default git commit message after resolving merge conflicts?

yoyodyn picture yoyodyn · Dec 19, 2012 · Viewed 28.2k times · Source

After doing a merge and resolving conflicts, is there an "easy" way to just accept the default generated commit message from the command line? One of our developers will resolve all the conflicts, and then do a git commit -m"Merge Commit" which replaces the generated commit message that listed all the conflict files. I would like to have a different flag that would just take the current file without modification. I know there is a -F or --file= option, but that requires knowing the file name all the time.

Thank you

Answer

gMale picture gMale · Mar 23, 2016

Per the docs, I just tried this simple command and it worked for me:

git commit --no-edit

Afterward, run git log to confirm that the default message has been used.