From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.chez-thomas.org (hermes.mlbassoc.com [64.234.241.98]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A6A29E00569 for ; Tue, 20 Sep 2011 08:33:01 -0700 (PDT) Received: by mail.chez-thomas.org (Postfix, from userid 999) id 515C2166025A; Tue, 20 Sep 2011 09:32:59 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on hermes.chez-thomas.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable version=3.3.2 Received: from hermes.chez-thomas.org (localhost.localdomain [127.0.0.1]) by mail.chez-thomas.org (Postfix) with ESMTP id A689F1660A96; Tue, 20 Sep 2011 09:32:57 -0600 (MDT) Message-ID: <4E78B229.5070207@mlbassoc.com> Date: Tue, 20 Sep 2011 09:32:57 -0600 From: Gary Thomas User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Chris Larson References: <4E68BB30.9070300@mlbassoc.com> <4E68CA23.40005@mlbassoc.com> In-Reply-To: <4E68CA23.40005@mlbassoc.com> Cc: Poky Project Subject: Re: [OT] splitting GIT repositories X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2011 15:33:02 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2011-09-08 07:58, Gary Thomas wrote: > On 2011-09-08 07:52, Chris Larson wrote: >> On Thu, Sep 8, 2011 at 5:55 AM, Gary Thomas wrote: >>> Sorry for the off-topic question, but I'm sure that I'm not the >>> only Poky user out there that has a similar dilemma. >>> >>> When I started working with Poky (quite some years ago), I added >>> my code/recipes/... to the Poky GIT tree locally. This let me >>> keep my parts up to date with the global repository fairly easily. >>> I've tried to keep things such that my changes are separated from >>> the Poky master changes. >>> >>> Now that the layering system is working well, and indeed I could >>> move from pure Yocto/Poky to oe-core, I'd like to split my files >>> away from the Poky tree I've been using. I'd also like to keep >>> history, etc, for my code as I do this. >>> >>> Is there some way to purge Poky master from my local tree? In >>> other words, remove all the Yocto/Poky files& directories, including >>> any history/commits/etc that go along with them? >>> >>> I've experimented some with clone + filter-branch which does >>> strip away the parts I don't want, but the history is cluttered >>> with Poky mainline commits. In the end, I'd like to end up with >>> just my files and the commits that created them. >> >> Make sure you pass --prune-empty to your filter-branch command. Unless >> all your files are within a particular subdirectory (in which case you >> can use subdirectory-filter), you may want to use an index-filter with >> git rm --cached of the files you don't care about (perhaps by using >> ls-files and grepping out the paths you know you care about). > > Could you give an example of this black magic? I've read through the > GIT man pages and they are quite terse. > > I did try this using subdirectory-filter and it kept only the files > I wanted but when I ran 'gitk --all', the history still went back to > day 1 of the Poky tree. > > Thanks for your help BTW, I found this script: https://github.com/apenwarr/git-subtree/blob/master/git-subtree.txt The 'split' function did exactly what I was looking for. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------