{"thread":{"id":"49661","subject":"[PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories","startedAt":"2018-10-24T08:04:58Z","lastAt":"2018-10-25T05:44:03Z","messageCount":2,"participants":["Uwe Kleine-König","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"361385","messageId":"20181024080452.11876-1-uwe@kleine-koenig.org","threadId":"49661","inReplyTo":null,"subject":"[PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories","fromName":"Uwe Kleine-König","fromEmail":"uwe@kleine-koenig.org","sentAt":"2018-10-24T08:04:52Z","receivedAt":"2018-10-24T08:04:58Z","isPatch":true,"sender":{"key":"uwe@kleine-koenig.org","avatar":null},"body":"Without passing --allow-unrelated-histories the command sequence\nfails as intended since commit e379fdf34fee (\"merge: refuse to create\ntoo cool a merge by default\"). To setup a subtree merging unrelated\nhistories is normal, so add the option to the howto document.\n\nSigned-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>\n---\n Documentation/howto/using-merge-subtree.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt\nindex 1ae8d1214ec0..a499a94ac228 100644\n--- a/Documentation/howto/using-merge-subtree.txt\n+++ b/Documentation/howto/using-merge-subtree.txt\n@@ -33,7 +33,7 @@ Here is the command sequence you need:\n \n ----------------\n $ git remote add -f Bproject /path/to/B <1>\n-$ git merge -s ours --no-commit Bproject/master <2>\n+$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/master <2>\n $ git read-tree --prefix=dir-B/ -u Bproject/master <3>\n $ git commit -m \"Merge B project as our subdirectory\" <4>\n \n-- \n2.19.1\n\n"},{"id":"361475","messageId":"xmqqd0ryk2ci.fsf@gitster-ct.c.googlers.com","threadId":"49661","inReplyTo":"20181024080452.11876-1-uwe@kleine-koenig.org","subject":"Re: [PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-25T05:43:57Z","receivedAt":"2018-10-25T05:44:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Uwe Kleine-König <uwe@kleine-koenig.org> writes:\n\n> Without passing --allow-unrelated-histories the command sequence\n> fails as intended since commit e379fdf34fee (\"merge: refuse to create\n> too cool a merge by default\"). To setup a subtree merging unrelated\n> histories is normal, so add the option to the howto document.\n>\n\nThanks.  We should have been more careful when we tightened \"git\nmerge\".\n\nWill apply.\n\n> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>\n> ---\n>  Documentation/howto/using-merge-subtree.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt\n> index 1ae8d1214ec0..a499a94ac228 100644\n> --- a/Documentation/howto/using-merge-subtree.txt\n> +++ b/Documentation/howto/using-merge-subtree.txt\n> @@ -33,7 +33,7 @@ Here is the command sequence you need:\n>  \n>  ----------------\n>  $ git remote add -f Bproject /path/to/B <1>\n> -$ git merge -s ours --no-commit Bproject/master <2>\n> +$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/master <2>\n>  $ git read-tree --prefix=dir-B/ -u Bproject/master <3>\n>  $ git commit -m \"Merge B project as our subdirectory\" <4>\n"}]}