From: Andrew Garber <andrew@andrewgarber.com>
To: git@vger.kernel.org
Cc: Edmond Halley <halleyinvent@gmail.com>
Subject: Re: How to import a exist git repository into another git repository?
Date: Tue, 4 Jan 2011 23:02:39 -0800 [thread overview]
Message-ID: <AANLkTin=AdUYEj8CJ=+YMROFh3BWhn4A+AeL+8fxkuoa@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=ahqFz=NVMrhtf+u2fJR_PAW-vcXgNYcce=2R+@mail.gmail.com>
What you're looking for is subtree merge:
http://progit.org/book/ch6-7.html
http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html
- Andrew Garber
On Tue, Jan 4, 2011 at 10:50 PM, Edmond Halley <halleyinvent@gmail.com> wrote:
> Hi,
>
> I have two exit repos A and B. I would like A becomes part of B. For example:
> original:
> A
> |-- a.cpp
> `-- Makefile
>
> B
> |-- b.cpp
> `-- Makefile
>
> combined:
> B
> |-- b.cpp
> |-- Makefile
> `-- A
> |-- a.cpp
> `-- Makefile
>
> The git log of repo A is kept in the combined repo.
>
> I try google but the following methods turn out they do not work like
> what I want. I can not view the log of original repo A after
> combining.
> 1) http://stackoverflow.com/questions/1683531/how-to-import-existing-git-repository-into-another
> Fail at the following command.
> git checkout -b ZZZ other/master
> error: Untracked working tree file 'Makefile' would be overwritten by merge.
>
> 2) http://thread.gmane.org/gmane.comp.version-control.git/5126/
> git log only give the lastest commit message. I do not know how to get
> the log if orignal repo A.
>
> Thank you!
>
> Best regards,
> Halley
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2011-01-05 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 6:50 How to import a exist git repository into another git repository? Edmond Halley
2011-01-05 7:02 ` Andrew Garber [this message]
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='AANLkTin=AdUYEj8CJ=+YMROFh3BWhn4A+AeL+8fxkuoa@mail.gmail.com' \
--to=andrew@andrewgarber.com \
--cc=git@vger.kernel.org \
--cc=halleyinvent@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).