合并忽略
创建自定义merge driver
git config --global merge.ours.driver true
在要被merge的分支上创建.gitattributes文件,并且在文件中置顶不merge的文件名
echo 'index.php merge=ours' >> .gitattributes git add .gitattributes git commit -m 'chore: Preserve index.php during merges' //只是为了commit代码
在项目根目录下新建文件.gitattributes,然后文件中写入需要忽略的文件名
merge=ours, 一个文件占一行 例: 忽略config.xml 文件 config.xml merge=ours