From: Timur Tabi Date: Tue, 21 Nov 2006 22:47:46 GMT Subject: Re: Is there a way to trim old SHAs from a git tree (so it's not so large)? Message-ID: <45638212.8030501@freescale.com> In-Reply-To: Johannes Schindelin wrote: > Hi, > > On Tue, 21 Nov 2006, Timur Tabi wrote: > >> Shawn Pearce wrote: >> >>> finally you can either run from that directory (see INSTALL file) >>> or you can install the binary somewhere else. We don't really >>> recommend using `pu` for production level work, so make sure you >>> have a backup of any repository you run it on. :) >> So how do I make a shallow clone? I've set it all up, but there is no >> git-shallow-clone command, and git help clone doesn't have anything either. > > Try "git clone --depth 1 ". This will cut each ancestor chain after > one ancestor (IIRC). I think you mean git-clone.sh instead of git-clone. If I do the above command, I get: $ ./git clone --depth 1 git://127.0.0.1/temp/u-boot-83xx/ Usage: /home/b04825/bin/git-clone [--template=] [--use-separate-remote] [--reference ] [--bare] [-l [-s]] [-q] [-u ] [--origin ] [-n] [] However, git-clone.sh is not quite working either. I had to run git-daemon on my machine, because git-clone.sh doesn't like the http protocol, and my firewall blocks everything but that. So I cloned a repo, started git-daemon, and I tried this: $ ./git-clone.sh --depth 1 git://127.0.0.1/temp/u-boot-83xx usage: git-fetch-pack [--all] [-q] [-v] [-k] [--thin] [--exec=upload-pack] [host:]directory ... fetch-pack from 'git://127.0.0.1/temp/u-boot-83xx/' failed. A regular git-clone of git://127.0.0.1/temp/u-boot-83xx works, so I think there's something wrong with git-clone.sh or my invocation thereof. -- Timur Tabi