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

I know that SVN (Subversion) stores files' deltas in order to efficiently store data. Git however, is a little more complex. What I'm wondering is that if I were to store plain HTML, image and js files, and keep track of their changes with either of them, which one would result in a better storage efficiency and why? I'm especially more interested in HTML files. At first there shouldn't be much difference. However, as the website changes, especially the home page, the difference should be obvious.

I could try both of them and compare them, however, it would take much time to see any real results. Hence, I decided to see which one should be theoretically more efficient.

share|improve this question

closed as not constructive by KronoS, Paul, TFM, DragonLord, 8088 Mar 6 '13 at 6:11

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

git will absolutely win, hands down. It is quite common that for git repository with text files (like HTML) metadata with all history in .git directory will be smaller than checkout of the whole tree. (You may want to run git gc once in a while, but git will run it automatically if it notices that object store is not very optimized).

For SVN, on other hand, even simple checkout will be at least 2x - it will contain all tree and also full backup of it in .svn directories, and it will not include any history - and it will still depend on working server.

Take a look at article Repository Formats Matter:

The Mozilla CVS repository was 2.7GB, imported to Subversion it grew to 8.2GB. Under Git, it shrunk to 450MB. Given that a Mozilla checkout is around 350MB, it’s fairly nice to have the whole project history (from 1998) in only slightly more space.

It is difficult to explain, but once you work with git even a bit, you will be blown away by its impossible speed. Everything is so fast, that it changes how you think about source control and what you do with it.

There are many other advantages to git, but I obviously cannot cover them all here. I would recommend reading some good book about it, for example ProGit.

share|improve this answer

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