From patchwork Wed Oct 24 08:04:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 10654353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CA3513A9 for ; Wed, 24 Oct 2018 08:04:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11ACE2A0E0 for ; Wed, 24 Oct 2018 08:04:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01CE52A0F7; Wed, 24 Oct 2018 08:04:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5320A2A0E0 for ; Wed, 24 Oct 2018 08:04:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727475AbeJXQb6 (ORCPT ); Wed, 24 Oct 2018 12:31:58 -0400 Received: from antares.kleine-koenig.org ([94.130.110.236]:51996 "EHLO antares.kleine-koenig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbeJXQb6 (ORCPT ); Wed, 24 Oct 2018 12:31:58 -0400 Received: by antares.kleine-koenig.org (Postfix, from userid 1000) id F074242D6D4; Wed, 24 Oct 2018 10:04:54 +0200 (CEST) From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: git@vger.kernel.org Cc: Junio C Hamano , Miklos Vajna Subject: [PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories Date: Wed, 24 Oct 2018 10:04:52 +0200 Message-Id: <20181024080452.11876-1-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without passing --allow-unrelated-histories the command sequence fails as intended since commit e379fdf34fee ("merge: refuse to create too cool a merge by default"). To setup a subtree merging unrelated histories is normal, so add the option to the howto document. Signed-off-by: Uwe Kleine-König --- Documentation/howto/using-merge-subtree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt index 1ae8d1214ec0..a499a94ac228 100644 --- a/Documentation/howto/using-merge-subtree.txt +++ b/Documentation/howto/using-merge-subtree.txt @@ -33,7 +33,7 @@ Here is the command sequence you need: ---------------- $ git remote add -f Bproject /path/to/B <1> -$ git merge -s ours --no-commit Bproject/master <2> +$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/master <2> $ git read-tree --prefix=dir-B/ -u Bproject/master <3> $ git commit -m "Merge B project as our subdirectory" <4>