howto/using-merge-subtree: mention --allow-unrelated-histories
authorUwe Kleine-König <uwe@kleine-koenig.org>
Wed, 24 Oct 2018 08:04:52 +0000 (10:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 25 Oct 2018 05:45:15 +0000 (14:45 +0900)
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 <uwe@kleine-koenig.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/howto/using-merge-subtree.txt
index 1ae8d1214ec0e8db1979a7770cf7602403358636..a499a94ac2289ac6664035d339e37914748757d2 100644 (file)
@@ -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>