From: Manuel Reimer <mail+git@m-reimer.de>
To: git@vger.kernel.org
Subject: How to integrate external repo into existing directory of a bigger repo (git subtree)?
Date: Thu, 24 Dec 2020 15:53:13 +0100 [thread overview]
Message-ID: <e30c1de9-9449-78d6-99eb-c3bbad673903@m-reimer.de> (raw)
Hello,
some while ago (before I found out that "git subtree" exists), I've set
up a big GIT repo consisting of several smaller modules. It was way more
convenient to maintain them all in one repository compared to having
each in its own repository.
As I need a separate repository per module for technical reasons, I
wrote a shellscript which temporarily checks out the external
repository, deletes all files, places the files from my big repo,
creates a generic commit with auto-generated commit message and then
pushes this to the server.
So what I have now is:
- Big repo consisting of many small modules, each one in its own
directory with proper commit messages
- Several external repositories with autogenerated commit messages
What I want to do is porting this over to "git subtree" somehow, but:
- I would prefer to not loose history in the "big repo"
- I can't force-push to the small external repositories (blocked)
Is there any chance to somehow "restart" the history of an existing
directory in a way to reproduce the commits of the external repository
so "git subtree" works as intended and I can "git subtree push" without
running into the server side "force push" block? I know that
reorganizing my whole big repo would do the trick as the subtree would
be added to a directory that never existed, but I would prefer to keep
it organized the way it is.
Thanks in advance
Manuel
next reply other threads:[~2020-12-24 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-24 14:53 Manuel Reimer [this message]
2020-12-25 10:12 ` How to integrate external repo into existing directory of a bigger repo (git subtree)? Manuel Reimer
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e30c1de9-9449-78d6-99eb-c3bbad673903@m-reimer.de \
--to=mail+git@m-reimer.de \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).