AntonNiklasson AntonNiklasson - 20 days ago 5
Javascript Question

Should yarn.lock be treated as a binary file in git?

Is there a reason for not doing so?

My idea is that the potential git diff will happen in package.json. I would like to treat the yarn.lock as a binary.

Answer

I posted this question on in Yarn's issue tracker on GitHub. Sebastian McKenzie answered the following:

No it shouldn't. The file is plain text and there can be merge conflicts in the file that you may need to resolve.

https://github.com/yarnpkg/yarn/issues/1776#issuecomment-260022242

Comments