summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-08 21:29:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-08 21:29:11 (GMT)
commitd04aa7ec4738f90220b9e205326f17938b8f89d4 (patch)
tree7be435da616d58dec183f8c6c8f1517819a2a626 /Documentation
parent72d917a7f9a5123ef7c0d6db306bbc0d385227e2 (diff)
parente379fdf34fee96cd205be83ff4e71699bdc32b18 (diff)
downloadgit-d04aa7ec4738f90220b9e205326f17938b8f89d4.zip
git-d04aa7ec4738f90220b9e205326f17938b8f89d4.tar.gz
git-d04aa7ec4738f90220b9e205326f17938b8f89d4.tar.bz2
Merge branch 'jc/merge-refuse-new-root'
"git merge" used to allow merging two branches that have no common base by default, which led to a brand new history of an existing project created and then get pulled by an unsuspecting maintainer, which allowed an unnecessary parallel history merged into the existing project. The command has been taught not to allow this by default, with an escape hatch "--allow-unrelated-histories" option to be used in a rare event that merges histories of two projects that started their lives independently. * jc/merge-refuse-new-root: merge: refuse to create too cool a merge by default
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-merge.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 07f7295..689aa4c 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -98,6 +98,19 @@ commit or stash your changes before running 'git merge'.
'git merge --abort' is equivalent to 'git reset --merge' when
`MERGE_HEAD` is present.
+--allow-unrelated-histories::
+ By default, `git merge` command refuses to merge histories
+ that do not share a common ancestor. This option can be
+ used to override this safety when merging histories of two
+ projects that started their lives independently. As that is
+ a very rare occasion, no configuration variable to enable
+ this by default exists and will not be added, and the list
+ of options at the top of this documentation does not mention
+ this option. Also `git pull` does not pass this option down
+ to `git merge` (instead, you `git fetch` first, examine what
+ you will be merging and then `git merge` locally with this
+ option).
+
<commit>...::
Commits, usually other branch heads, to merge into our branch.
Specifying more than one commit will create a merge with