Never Ever Add Binary Files To Your VCS

OK, sometimes you are allowed to keep track of blobs but only if you have no alternatives. There are very few situations where you cannot do otherwise: for example when you need to track Linux symbolic links in a version control system thought for Windows (who said StarTeam?).

Anyway, binary files are something that will only cause you troubles, even if you think they'll never change. Once a colleague of mine said: "when this piece will be stable, we can create an archive and add it to our repository". A month later it was considered stable, we had to change it. And then we changed it again, and again, and again...

But what's the problem with binary blobs? Well, there are a couple, both related to the fact that your VCS can do nothing to help you manage them.

  1. The diff makes no sense, so you can rely only on commit message to understand what changed.

  2. As a corollary of previous point, both automatic and manual merges are impossible.

For these reasons, it's really easy to make mistakes, override someone else's changes and make old bugs reappear. Do yourself a favor: avoid adding binary files to your repository!


Cover image taken from Pixabay licensed under the Creative Commons Public Domain Dedication license.