git config --global merge.ours.driver true
echo 'index.php merge=ours' >> .gitattributesgit add .gitattributesgit commit -m 'chore: Preserve index.php during merges' //只是为了commit代码,可以
(newbranch) $ git checkout master(master) $ git merge newbranchAuto-merging ...Merge made by the 'recursive' strategy. demo-shared | 1 + 1 file changed, 1 insertion(+)