From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 1306D1F4B4 for ; Thu, 24 Dec 2020 14:54:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727240AbgLXOyZ (ORCPT ); Thu, 24 Dec 2020 09:54:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbgLXOyZ (ORCPT ); Thu, 24 Dec 2020 09:54:25 -0500 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050::465:201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89F1DC061573 for ; Thu, 24 Dec 2020 06:53:44 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4D1tNs1KQMzQlXP for ; Thu, 24 Dec 2020 15:53:17 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=m-reimer.de; s=MBO0001; t=1608821595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aX2+97TXtkzN8NrM/naCP2NJAJkWuGS0owIx1pdsLks=; b=d0m8Wm4y9dGWv2MbFTbZOzc1mDpsKyFNEhnrnoxNwOfoU9f0KCRBh+vmy/PWQO9CKrsNBX L1qe25S0ozSliMDhnMJqF5meJAYNmbCohg39/LSlQtXKZqvz1AIjzJyWhIYfWR1H7IhDSV nPaW1V1VZeyhuB0xClWljRbMUzx8golYaeH2PTuBlDCmuJjWr7xLLBdMNWYbYt2uBr3rA2 AjioaJA5R9+jTwDNGQyG1zkb19fyBd2MKu8O6Q4yJ8g5o9xxiL+2CeiLtSZtw3jcSD0hnF tDNLcvhzhbVgwlrNc1LswGvG7LrTRCpsJhMBtGYMDw8VDXVHrjiM38lKIrAH8g== Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id NBRuW9Mwbb_Y for ; Thu, 24 Dec 2020 15:53:13 +0100 (CET) To: git@vger.kernel.org From: Manuel Reimer Subject: How to integrate external repo into existing directory of a bigger repo (git subtree)? Message-ID: Date: Thu, 24 Dec 2020 15:53:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-MBO-SPAM-Probability: X-Rspamd-Score: -3.08 / 15.00 / 15.00 X-Rspamd-Queue-Id: 3EDE41718 X-Rspamd-UID: 706e2b Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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