Hey, I'm a git newb, and I just started using it to host my scripts from ~/bin (they are already on UbuntuOne, so there is no real point to this, but maybe I'll change that).
There is no real point for me to save every revision of my scripts locally if it is already on github. Any way to get around this?
Also, how does that actually work? I know that past versions are saved in some compressed format, but does it just save diffs, or the whole thing. I could imagine the size getting quite large if I continue to tweak these scripts for years (as one does). Does using this kind of source control have a big overhead in terms of storage space?
What have you learned about git by searching on the Internet?
I recently started reading "Version Control With Git". My respect for git as a piece of software went from "pretty nice" to "holy cow I wish I had more reasons to use git because it's SO STINKING AWESOME".
Anyway, don't worry about keeping the old versions of your files locally on your computer. They shouldn't take up any noticable space.
git is *really* space efficient so you shouldn't worry about it.
If you really want to checkout a copy without history, use the --depth option
Create a shallow clone with a history truncated to the specified
number of revisions. A shallow repository has a number of
limitations (you cannot clone or fetch from it, nor push from nor
into it), but is adequate if you are only interested in the recent
history of a large project with a long history, and would want to
send in fixes as patches.
Emphasis added by me.
Last edited by fukawi2 (2013-01-03 22:02:23)
This is a very good article which may help you understand the git history format: http://eagain.net/articles/git-for-computer-scientists/