How does Git deal with binary files?

prosseek picture prosseek · Aug 30, 2010 · Viewed 49.7k times · Source
  • Do I have to do something to tell Git whether some files are binary (like in Subversion)? Or, can Git handle binary data automatically?
  • If I change the binary file, so that I have 100 binary revisions, will git just store all 100 versions individually in the repository?
  • What are submodules for with git?

Answer

Amber picture Amber · Aug 30, 2010
  1. Git can usually detect binary files automatically.
  2. No, Git will attempt to store delta-based changesets if it's less expensive to (not always the case).
  3. Submodules are used if you want to reference other Git repositories within your project.