git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: importing two different trees into a fresh git repo

From
CMConstantine A. Murenin <mureninc@gmail.com>
Date
Feb 6, 2013, 00:35 UTC
Message-ID
<CAPKkNb494MvSETOS+1R+dbxKzcwZhbz7jEB-W=z-XuLBKDJWeA@mail.gmail.com>
In-Reply-To
<7va9riqtro.fsf@alter.siamese.dyndns.org>
On 5 February 2013 14:29, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> "Constantine A. Murenin" <mureninc@gmail.com> writes:
>
>> I have two distinct trees that were not managed by any RCS, and I'd
>> like to import them into a single repository into two separate orphan
>> branches, then make sense of what's in there, merge, and unify into
>> 'master'.
>>
>> (To give some context, it's /etc/nginx config files from nginx/1.0.12
>> on Debian 6 and nginx/1.2.2 on OpenBSD 5.2.)
>
> As these come from two totally separate sources, I'd find it more
> natural to do two repositories, deb-nginx-conf and obsd-nginx-conf,
> each with one commit and then pull one into the other (or pull both
> to master-nginx-conf if you really wanted to), to me.

Yeah, I guess it might be more of a git-style to have two/three separate repositories here. (The sources are just a couple of files, so I think my specific example still calls for merely two orphan branches.)

Still, is it really expected that you can't create an orphan branch in an empty repository? On the outside, this sounds like a rather benign bug.

C.
Previous: Junio C HamanoNext: Jeff King
Message 3 of 4 in “importing two different trees into a fresh git repo”
  1. Constantine A. MureninFeb 5, 2013
  2. Junio C HamanoFeb 5, 2013
  3. Constantine A. MureninFeb 6, 2013
  4. Jeff KingFeb 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.