我应该在手动合并后删除提交消息中的冲突列表吗? [英] Should I remove the list of conflicts in my commit message after doing a manual merge?

查看:99
本文介绍了我应该在手动合并后删除提交消息中的冲突列表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我运行 git pull ,并且存在git无法自动合并的冲突。



合并更改并运行 git commit ,我应该保留git在提交中生成的 Conflicts:部分一个记录,这些文件被手动合并),或删除它(因为冲突没有提交)?

我不知道最佳实践是什么 - 是在那里警告,以确保你修复了冲突,或者实际上记录在提交消息中?

解决方案

这看起来像个人意见类型的问题,所以我会回答我的意见[ - ;



我单独离开冲突部分作为提醒,这种合并产生了冲突。有时我不会适当地处理冲突,并且稍后会产生一些不良后果,所以能够查看提交历史并查看文件中存在冲突是很好的。


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?

解决方案

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.

这篇关于我应该在手动合并后删除提交消息中的冲突列表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆