有几种方法可以在 git merge 时忽略特定文件的合并:
方法一:使用 .gitattributes 文件(推荐)
在项目根目录创建或编辑 .gitattributes 文件:
infostation.js merge=ours *.js merge=ours # 如果需要忽略所有 js 文件的合并
然后设置合并策略:
git config merge.ours.driver
git config --global merge.ours.driver

