blob: dfb43d000fa8f539a99bae771fca87abfd46e507 [file] [log] [blame]
Junio C Hamanoc21ab052009-10-31 04:03:551--commit::
2--no-commit::
3Perform the merge and commit the result. This option can
4be used to override --no-commit.
5+
6With --no-commit perform the merge but pretend the merge
7failed and do not autocommit, to give the user a chance to
8inspect and further tweak the merge result before committing.
Junio C Hamano610d1762008-11-28 06:27:139
Junio C Hamano11821ed2011-10-19 18:42:0910--edit::
Junio C Hamano7e590a12013-06-02 23:46:5211-e::
Junio C Hamano795a5a32012-02-02 01:36:3712--no-edit::
13Invoke an editor before committing successful mechanical merge to
14further edit the auto-generated merge message, so that the user
15can explain and justify the merge. The `--no-edit` option can be
16used to accept the auto-generated message (this is generally
Junio C Hamanoc5bd79e2014-01-27 21:31:2617discouraged).
18ifndef::git-pull[]
19The `--edit` (or `-e`) option is still useful if you are
20giving a draft message with the `-m` option from the command line
21and want to edit it in the editor.
22endif::git-pull[]
Junio C Hamano795a5a32012-02-02 01:36:3723+
24Older scripts may depend on the historical behaviour of not allowing the
25user to edit the merge log message. They will see an editor opened when
26they run `git merge`. To make it easier to adjust such scripts to the
27updated behaviour, the environment variable `GIT_MERGE_AUTOEDIT` can be
28set to `no` at the beginning of them.
Junio C Hamano11821ed2011-10-19 18:42:0929
Junio C Hamanoc21ab052009-10-31 04:03:5530--ff::
Junio C Hamanof54f08e2012-02-27 07:49:1931When the merge resolves as a fast-forward, only update the branch
32pointer, without creating a merge commit. This is the default
33behavior.
34
Junio C Hamanoc21ab052009-10-31 04:03:5535--no-ff::
Junio C Hamanof54f08e2012-02-27 07:49:1936Create a merge commit even when the merge resolves as a
Junio C Hamano778a3412013-03-28 23:24:3037fast-forward. This is the default behaviour when merging an
38annotated (and possibly signed) tag.
Junio C Hamanof54f08e2012-02-27 07:49:1939
40--ff-only::
41Refuse to merge and exit with a non-zero status unless the
42current `HEAD` is already up-to-date or the merge can be
43resolved as a fast-forward.
Junio C Hamano6d76d612008-05-09 05:46:0844
Junio C Hamano3b4609d2010-09-30 00:04:3445--log[=<n>]::
Junio C Hamanoc21ab052009-10-31 04:03:5546--no-log::
Junio C Hamano6d76d612008-05-09 05:46:0847In addition to branch names, populate the log message with
Junio C Hamano3b4609d2010-09-30 00:04:3448one-line descriptions from at most <n> actual commits that are being
49merged. See also linkgit:git-fmt-merge-msg[1].
Junio C Hamanoc21ab052009-10-31 04:03:5550+
51With --no-log do not list one-line descriptions from the
52actual commits being merged.
Junio C Hamano6d76d612008-05-09 05:46:0853
Junio C Hamano6d76d612008-05-09 05:46:0854
Junio C Hamanoc21ab052009-10-31 04:03:5555--stat::
56-n::
57--no-stat::
58Show a diffstat at the end of the merge. The diffstat is also
59controlled by the configuration option merge.stat.
60+
61With -n or --no-stat do not show a diffstat at the end of the
62merge.
Junio C Hamano1b50ce92007-10-03 12:05:5363
Junio C Hamano3901ffb2006-06-26 23:46:5364--squash::
Junio C Hamanoc21ab052009-10-31 04:03:5565--no-squash::
Junio C Hamanod75148a2014-04-08 19:48:3866Produce the working tree and index state as if a real merge
67happened (except for the merge information), but do not actually
68make a commit, move the `HEAD`, or record `$GIT_DIR/MERGE_HEAD`
69(to cause the next `git commit` command to create a merge
70commit). This allows you to create a single commit on top of
71the current branch whose effect is the same as merging another
72branch (or more in case of an octopus).
Junio C Hamanoc21ab052009-10-31 04:03:5573+
74With --no-squash perform the merge and commit the result. This
75option can be used to override --squash.
Junio C Hamano1b50ce92007-10-03 12:05:5376
Junio C Hamanoeb415992008-06-08 22:49:4777-s <strategy>::
78--strategy=<strategy>::
Junio C Hamano1a4e8412005-12-27 08:17:2379Use the given merge strategy; can be supplied more than
80once to specify them in the order they should be tried.
81If there is no `-s` option, a built-in list of strategies
Junio C Hamano1aa40d22010-01-21 17:46:4382is used instead ('git merge-recursive' when merging a single
83head, 'git merge-octopus' otherwise).
Junio C Hamanoc21ab052009-10-31 04:03:5584
Junio C Hamanob04bb3f2010-04-14 14:07:3685-X <option>::
86--strategy-option=<option>::
87Pass merge strategy specific option through to the merge
88strategy.
89
Junio C Hamanoedf80bd2013-04-05 22:14:3690--verify-signatures::
91--no-verify-signatures::
92Verify that the commits being merged have good and trusted GPG signatures
93and abort the merge in case they do not.
94
Junio C Hamanoc21ab052009-10-31 04:03:5595--summary::
96--no-summary::
97Synonyms to --stat and --no-stat; these are deprecated and will be
98removed in the future.
99
Junio C Hamanoea90ab32010-03-15 20:32:55100ifndef::git-pull[]
Junio C Hamanoc21ab052009-10-31 04:03:55101-q::
102--quiet::
Junio C Hamanod2c978f2011-03-20 19:42:22103Operate quietly. Implies --no-progress.
Junio C Hamanoc21ab052009-10-31 04:03:55104
105-v::
106--verbose::
107Be verbose.
Junio C Hamanod2c978f2011-03-20 19:42:22108
109--progress::
110--no-progress::
111Turn progress on/off explicitly. If neither is specified,
112progress is shown if standard error is connected to a terminal.
113Note that not all merge strategies may support progress
114reporting.
115
Junio C Hamanoea90ab32010-03-15 20:32:55116endif::git-pull[]
Junio C Hamano7921e7c2016-04-29 21:55:09117
118--allow-unrelated-histories::
119By default, `git merge` command refuses to merge histories
120that do not share a common ancestor. This option can be
121used to override this safety when merging histories of two
122projects that started their lives independently. As that is
123a very rare occasion, no configuration variable to enable
124this by default exists and will not be added.