.gitattributes can turn off the merge driver for a path with -merge. On a
conflict, git then stops trying to interleave hunks. It keeps the current
branch's whole version of the file and reports a plain conflict. This matters
for generated files: a text merge can splice two halves into something that
still parses but is wrong — a composer.lock with a content hash that matches
nothing, and no warning. A loud conflict you regenerate from is safer than a
quiet merge that lies about what's in the file.
composer.lock -merge
languages/**/*.mo binary
languages/**/*.l10n.php -merge
languages/**/*.json -merge
The right way to resolve these is always "rebuild" — composer install, or
recompile the translations — never "pick hunks". binary on the .mo files is
the stronger form: no line diff at all, so you pick a side and rebuild.
-merge — add a line for a lockfile or build output to a repo's .gitattributes.
Done when: git check-attr merge <file> prints merge: unset.