我一直在使用git几年,每当偶尔做一次合并时,git会报告一些奇怪的冲突。下面是一个.htaccess文件的一个例子,从我在新版本7.24 Drupal核心的合并:Git:错误的合并冲突?
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
<<<<<<< HEAD
Order allow,deny
</FilesMatch>
# Hide important scripts from malicious users.
<FilesMatch "^(autoinstall\.php|install\.php|update\.php)$">
=======
>>>>>>> 7.24
Order allow,deny
</FilesMatch>
如何有冲突吗?这甚至不是空白/端线差异的潜在情况:在冲突的7.24部分中仅有没有。
为什么git会抱怨呢?我可能误解的东西根本...
您也可以启用“git config --global merge.conflictstyle diff3”来查看合并冲突中的共同祖先。 –