From owner-freebsd-arch@FreeBSD.ORG Sat Aug 27 01:55:49 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CFDA106566B; Sat, 27 Aug 2011 01:55:49 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0A00E8FC13; Sat, 27 Aug 2011 01:55:48 +0000 (UTC) Received: by gyd10 with SMTP id 10so4033049gyd.13 for ; Fri, 26 Aug 2011 18:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=MLiDUt6yYzITlHIE75aa5de8mOmB3wF3PW1X1YDxyu4=; b=BiVUqOnJfTHSGTcM9AS8YgIOmSdDIZ6SBE0Vp4F5ofkU0t3KF6KyNdsUaR9e1Gs1Dt Hk+Mj9Dvu6TXrWLYdkj1oYninf0hLBxI2c10yiN8mkuzIwK4hPe7FWffvBNnjsvAa3nN M5vKbbWHQWyV2Y+pcG1TcGwg5IHFcGGZHlDCM= MIME-Version: 1.0 Received: by 10.236.181.131 with SMTP id l3mr10918865yhm.44.1314408378549; Fri, 26 Aug 2011 18:26:18 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.102.147 with HTTP; Fri, 26 Aug 2011 18:26:18 -0700 (PDT) In-Reply-To: <20110826183130.GA40586@tops> References: <35765857-1314243257-cardhu_decombobulator_blackberry.rim.net-329610575-@b2.c15.bise7.blackberry> <20110826183130.GA40586@tops> Date: Fri, 26 Aug 2011 18:26:18 -0700 X-Google-Sender-Auth: gKDmTNwRIgAMxR2oZDyq0cyUiio Message-ID: From: Artem Belevich To: Gleb Kurtsou Content-Type: text/plain; charset=ISO-8859-1 Cc: mdf@freebsd.org, Adrian Chadd , Jonathan Anderson , vadim_nuclight@mail.ru, Robert Watson , freebsd-arch@freebsd.org Subject: Re: Official git export (was: Re: FreeBSD problems and preliminary ways to solve) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2011 01:55:49 -0000 Hi, On Fri, Aug 26, 2011 at 11:31 AM, Gleb Kurtsou wrote: > Jonathan, could you update /Git wiki page with an example of git clone > specifying only head branch and how to add another branch later. That > would make local repository copy smaller, pull faster and > 'git branch -r' output much shorter. Here you go: $ mkdir small-clone $ cd small-clone $ git init # Tell git to fetch only master (AKA head) and stable/8 branches $ git remote add -t master -t stable/8 origin git://git.freebsd.your.org/freebsd.git $ git fetch origin # fetches about 1.6M objects remote: Counting objects: 1600952, done. remote: Compressing objects: 100% (418377/418377), done. remote: Total 1600952 (delta 1227540), reused 1524707 (delta 1159458) Receiving objects: 100% (1600952/1600952), 632.85 MiB | 3.12 MiB/s, done. Resolving deltas: 100% (1227540/1227540), done. From git://git.freebsd.your.org/freebsd * [new branch] master -> origin/master * [new branch] stable/8 -> origin/stable/8 # Add stable/7 branch and fetch it $ git remote set-branches origin --add stable/7 $ git fetch origin remote: Counting objects: 35713, done. remote: Compressing objects: 100% (11359/11359), done. remote: Total 27595 (delta 20679), reused 22440 (delta 16043) Receiving objects: 100% (27595/27595), 14.40 MiB | 1.93 MiB/s, done. Resolving deltas: 100% (20679/20679), completed with 2329 local objects. From git://git.freebsd.your.org/freebsd * [new branch] stable/7 -> origin/stable/7 $ git branch -r origin/HEAD -> origin/head origin/master origin/stable/7 origin/stable/8 Practically it does not save you all that much on repo size or the time to fetch stuff. Complete clone is ~700M/1.9M objects and head+stable/8 clone is only about 10% smaller. If you really want to have smaller repo you will need to trip repo history. I'm not sure yet how to do that. --Artem