Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to use git to manage my pictures (backup / take snapshots). The entire library is several GB. Most of the files are JPGs of 2-3M. When I was adding the files into repository, it seemed to be taking several days. CPU utilization was always near 100%.

Is there a reason why git should be slow on large files?

p.s. I know git was not designed for this.

share|improve this question

Git by default compresses files. JPEGs by default are already compressed. It's not that it's large files, it's that it's compressed files.

You'll notice the same effect adding ZIP files to a git repository.

EDIT: There is an interesting thread on about compression.

share|improve this answer
How can I tell git not to compress files? I don't necessarily need space efficiency. I want it to be as fast as possible. Thanks! – woodings Mar 31 '12 at 4:01
There's a host of switches you can play with in git config, including core.compression and pack.window. Seeing as I've never actually tried running git without compression, YMMV. Please post what you discovered, to help us all learn from your experience. – user3463 Mar 31 '12 at 4:07
@Eroen, you make a good point. I've voted your comment up. – user3463 Mar 31 '12 at 4:08
Git also makes (and checks) a sha1 hash of every file every time it uses it, that can take some time too for large files. – Eroen Mar 31 '12 at 4:08
@RandolphWest: Good, but wrong. zlib compression can be turned off by $ git set core.compression 0. sha1 is tens of MiB per second, but they might interfere badly with low memory conditions. – Eroen Mar 31 '12 at 4:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.