home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] philosophy of initial content for git repository?

  • Subject: Re: [OCLUG-Tech] philosophy of initial content for git repository?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Tue, 23 Sep 2014 10:05:50 -0400 (EDT)
On Tue, 23 Sep 2014, Richard Guy Briggs wrote:

> On 14/09/23, Robert P. J. Day wrote:
>
> >   not sure why it didn't occur to me at the time, but if i were to
> > do this again, i'd just check the original source into a git
> > "orphan" branch so it's part of the repo but stays out of the way.
>
> I don't know what an orphan branch is, but this sounds like it could
> work.

  git checkout option "--orphan":

       --orphan <new_branch>
           Create a new orphan branch, named <new_branch>, started from <start_point> and switch to it.
           The first commit made on this new branch will have no parents and it will be the root of a new
           history totally disconnected from all the other branches and commits.

simply put, an orphan branch can be considered totally independent
content from all the rest of the repository history, but it's
something you still want to keep around as it is somehow *associated*
with the repository.

  the yocto project uses an orphan branch called "meta" in their
kernel source, which contains yocto-specific content that is applied
to regular kernel source to produce "yoctofied" kernel source. it is
yocto-only and will never be upstreamed, but it makes sense to keep it
next to the kernel which is where it belongs.

  these days, i would use exactly that to store the original, crappy,
ugly source.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================