Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I remove the list of conflicts in my commit message after doing a manual merge?

Tags:

Say I run git pull and there is a conflict that git cannot automatically merge.

After I manually merge the changes, and run git commit, should I leave the Conflicts: section that git generates in the commit (as a record that those files were manually merged), or removed it (as the conflict is not being committed)?

I'm never sure what best practice is - is the warning there to make sure you fix the conflicts, or to be actually logged in the commit message?

like image 754
nfm Avatar asked Mar 24 '11 03:03

nfm


People also ask

What happens if you get a conflict during a merge?

A merge conflict is an event that occurs when Git is unable to automatically resolve differences in code between two commits. When all the changes in the code occur on different lines or in different files, Git will successfully merge commits without your help.


1 Answers

This seems like a personal opinion type of question, so I'll answer with my opinion [-;

I leave the Conflicts section alone as a reminder down the road that this merge produced conflicts. Occasionally I don't handle the conflicts appropriately, and it will produce some undesired effect later, so it's nice to be able to look through the commit history and see that there was a conflict in a file.

like image 105
jaredonline Avatar answered Oct 20 '22 08:10

jaredonline