I was browsing yarn's berry repository and stumbled upon this setting in their .gitattributes
file:
# Mark .pnp.js as binary to prevent git from trying to merge it
/.pnp.js binary linguist-generated
Why does git, by default, prevent binary files from being merged automatically? Is it because most editors would fare poorly at editing the contents of such files?
First because it is meaningless. How do you merge two executable files? What would be the result? Will it be also executable?
Second because git is technically oriented towards working with lines. It merges files line-by-line (well, blocks of lines). And binary files don't have lines.