You are not logged in.

#1 2013-01-03 03:22:12

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

git newb: possible to use github without mirroring history locally?

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?

Offline

#2 2013-01-03 03:39:55

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: git newb: possible to use github without mirroring history locally?

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.

Offline

#3 2013-01-03 16:22:34

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: git newb: possible to use github without mirroring history locally?

git is *really* space efficient so you shouldn't worry about it.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2013-01-03 22:01:59

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: git newb: possible to use github without mirroring history locally?

Mr.Elendig wrote:

git is *really* space efficient so you shouldn't worry about it.

This.

If you really want to checkout a copy without history, use the --depth option

man git-clone wrote:

       --depth <depth>
           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)

Offline

#5 2013-01-06 16:38:12

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: git newb: possible to use github without mirroring history locally?

This is a very good article which may help you understand the git history format: http://eagain.net/articles/git-for-computer-scientists/

Offline

Board footer

Powered by FluxBB