For Git, since all the history is there, I am wondering, saying if I keep a repo for keeping all code I have written, over the 5 years or 10 years, with all revision history, then the repo becomes 5GB.

And if a machine doesn't have a repo, and I want to just try a code snippet or a small Rails project, I have to clone the whole 5GB over, and that won't be too practical.

Say, if out of the 5GB, only 200MB is the current files, and all the other are history, then at least if using SVN, then each machine will have the 200MB, instead of 5GB. Maybe Git is very suited for each self-contained small or medium projects, but what if it is a "long term my whole life repo", then how to use Git for it?