All of lore.kernel.org
 help / color / mirror / Atom feed
* [OT] splitting GIT repositories
@ 2011-09-08 12:55 Gary Thomas
  2011-09-08 13:52 ` Chris Larson
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2011-09-08 12:55 UTC (permalink / raw)
  To: Poky Project

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.

Thanks for any pointers or ideas

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OT] splitting GIT repositories
  2011-09-08 12:55 [OT] splitting GIT repositories Gary Thomas
@ 2011-09-08 13:52 ` Chris Larson
  2011-09-08 13:58   ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Larson @ 2011-09-08 13:52 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Poky Project

On Thu, Sep 8, 2011 at 5:55 AM, Gary Thomas <gary@mlbassoc.com> 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).
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OT] splitting GIT repositories
  2011-09-08 13:52 ` Chris Larson
@ 2011-09-08 13:58   ` Gary Thomas
  2011-09-20 15:32     ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2011-09-08 13:58 UTC (permalink / raw)
  To: Chris Larson; +Cc: Poky Project

On 2011-09-08 07:52, Chris Larson wrote:
> On Thu, Sep 8, 2011 at 5:55 AM, Gary Thomas<gary@mlbassoc.com>  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

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OT] splitting GIT repositories
  2011-09-08 13:58   ` Gary Thomas
@ 2011-09-20 15:32     ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2011-09-20 15:32 UTC (permalink / raw)
  To: Chris Larson; +Cc: Poky Project

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<gary@mlbassoc.com> 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
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-20 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08 12:55 [OT] splitting GIT repositories Gary Thomas
2011-09-08 13:52 ` Chris Larson
2011-09-08 13:58   ` Gary Thomas
2011-09-20 15:32     ` Gary Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.