All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jared Tobin <jared@jtobin.io>
To: git@vger.kernel.org
Subject: Re: Merging two Git-Repositories
Date: Tue, 17 Dec 2019 19:03:54 +0800	[thread overview]
Message-ID: <20191217110354.GA82154@castor> (raw)
In-Reply-To: <trinity-c6dbf360-5abe-43df-8428-85514195a7a6-1576574916643@3c-app-gmx-bs62>

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

On Tue, Dec 17, 2019 at 10:28:36AM +0100, Steve Keller wrote:
> Is it possible to merge one Git-Repository into another?  I have
> developed two independent repositories A and B, and now I find that B
> should be part of A in new sub-directory, e.g. A/B.  I want to move B
> into A while keeping the whole development history of B.

You can accomplish this with git-subtree(1), for which IMO the intuition
of "exotic merge commit" more or less suffices.

An example (from A):

  git remote add B B_REMOTE_ADDRESS
  git subtree add --prefix B B master

-- jared

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2019-12-17 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17  9:28 Merging two Git-Repositories Steve Keller
2019-12-17 10:02 ` Roger Gammans
2019-12-17 11:03 ` Jared Tobin [this message]
2019-12-17 20:13 ` Stephan Beyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191217110354.GA82154@castor \
    --to=jared@jtobin.io \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.