From: Karl Hasselström Date: Mon, 08 Oct 2007 13:01:06 GMT Subject: Re: Trying to use git-filter-branch to compress history by removing large, obsolete binary files Message-ID: <20071008130106.GA10784@diana.vm.bytemark.co.uk> In-Reply-To: <20071008124017.GA22129@potapov> On 2007-10-08 16:40:17 +0400, Dmitry Potapov wrote: > On Mon, Oct 08, 2007 at 11:27:33AM +0200, Andreas Ericsson wrote: > > > A clone only fetches revs reachable from a ref, so pruning > > immediately after a clone is completely pointless. > > Not true. git-clone copies the whole pack, so it can contain > unreachable objects. [...] > git-clone -l test/.git test2 Try without the -l option and with a file:// URL: git clone file:///path/to/test/.git test2 From the git-clone man page: --local:: -l:: When the repository to clone from is on a local machine, this flag bypasses normal "git aware" transport mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories. The files under `.git/objects/` directory are hardlinked to save space when possible. This is now the default when the source repository is specified with `/path/to/repo` syntax, so it essentially is a no-op option. To force copying instead of hardlinking (which may be desirable if you are trying to make a back-up of your repository), but still avoid the usual "git aware" transport mechanism, `--no-hardlinks` can be used. -- Karl Hasselström, kha@treskal.com www.treskal.com/kalle