How do different version control systems handle binary files?
git, mercurial, svn, version-control
Solution
The main pain point is in the "Distributed" aspect of any DVCS: you are cloning everything (the all history of all files)
Since binaries aren't stored in delta for most of them, and aren't compressed as well as text file, if you are storing rapidly evolving binaries, you end up quickly with a large repository which becomes much cumbersome to move around (push/pull).
For Git for instance, see What are the git limits?.
Binaries aren't a good fit for the feature a VCS can bring (diff, branch, merge), and are better managed in an artifact repository (like a Nexus for example). This is not necessary the case for a CVCS (Centralized VCS) where the repository could play that role and be a storage for binaries (even if its not its primary role)
Problem
I have heard some claims that SVN handles binary files better than Git/Mercurial. Is this true and if so then why? As far as I can imagine, no version control system (VCS) can diff and merge changes between two revisions of the same binary resources. So, aren't all VCS's bad at handling binary files? I am not very aware of the technical details behind particular VCS implementations so maybe they have some pros and cons.
Related problems
- How does Git deal with binary files?
- Managing large binary files with Git
- What are the file limits in Git (number and size)?
- Git or Subversion for binary files
- Can GIT, Mercurial, SVN, or other version control tools work well when project tree has binary files?
- Does any Version Control System like SVN, Git, or Mercurial let you "keep latest version" but not the revisions? (such as for binary files)
- Version control for large binary files and >1TB repositories?