blob: 3888c3ff85e2dc5b137e4e3ed50e39327760a02a [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
Junio C Hamano88bf5712017-09-10 08:39:2342current `HEAD` is already up to date or the merge can be
Junio C Hamanof54f08e2012-02-27 07:49:1943resolved as a fast-forward.
Junio C Hamano6d76d612008-05-09 05:46:0844
Junio C Hamanof7e3f472017-10-20 06:45:2445-S[<keyid>]::
46--gpg-sign[=<keyid>]::
47GPG-sign the resulting merge commit. The `keyid` argument is
48optional and defaults to the committer identity; if specified,
49it must be stuck to the option without a space.
50
Junio C Hamano3b4609d2010-09-30 00:04:3451--log[=<n>]::
Junio C Hamanoc21ab052009-10-31 04:03:5552--no-log::
Junio C Hamano6d76d612008-05-09 05:46:0853In addition to branch names, populate the log message with
Junio C Hamano3b4609d2010-09-30 00:04:3454one-line descriptions from at most <n> actual commits that are being
55merged. See also linkgit:git-fmt-merge-msg[1].
Junio C Hamanoc21ab052009-10-31 04:03:5556+
57With --no-log do not list one-line descriptions from the
58actual commits being merged.
Junio C Hamano6d76d612008-05-09 05:46:0859
Junio C Hamano3a9c0342017-11-10 06:01:1260--signoff::
61--no-signoff::
62Add Signed-off-by line by the committer at the end of the commit
63log message. The meaning of a signoff depends on the project,
64but it typically certifies that committer has
65the rights to submit this work under the same license and
66agrees to a Developer Certificate of Origin
67(see http://developercertificate.org/ for more information).
68+
69With --no-signoff do not add a Signed-off-by line.
Junio C Hamano6d76d612008-05-09 05:46:0870
Junio C Hamanoc21ab052009-10-31 04:03:5571--stat::
72-n::
73--no-stat::
74Show a diffstat at the end of the merge. The diffstat is also
75controlled by the configuration option merge.stat.
76+
77With -n or --no-stat do not show a diffstat at the end of the
78merge.
Junio C Hamano1b50ce92007-10-03 12:05:5379
Junio C Hamano3901ffb2006-06-26 23:46:5380--squash::
Junio C Hamanoc21ab052009-10-31 04:03:5581--no-squash::
Junio C Hamanod75148a2014-04-08 19:48:3882Produce the working tree and index state as if a real merge
83happened (except for the merge information), but do not actually
84make a commit, move the `HEAD`, or record `$GIT_DIR/MERGE_HEAD`
85(to cause the next `git commit` command to create a merge
86commit). This allows you to create a single commit on top of
87the current branch whose effect is the same as merging another
88branch (or more in case of an octopus).
Junio C Hamanoc21ab052009-10-31 04:03:5589+
90With --no-squash perform the merge and commit the result. This
91option can be used to override --squash.
Junio C Hamano1b50ce92007-10-03 12:05:5392
Junio C Hamanoeb415992008-06-08 22:49:4793-s <strategy>::
94--strategy=<strategy>::
Junio C Hamano1a4e8412005-12-27 08:17:2395Use the given merge strategy; can be supplied more than
96once to specify them in the order they should be tried.
97If there is no `-s` option, a built-in list of strategies
Junio C Hamano1aa40d22010-01-21 17:46:4398is used instead ('git merge-recursive' when merging a single
99head, 'git merge-octopus' otherwise).
Junio C Hamanoc21ab052009-10-31 04:03:55100
Junio C Hamanob04bb3f2010-04-14 14:07:36101-X <option>::
102--strategy-option=<option>::
103Pass merge strategy specific option through to the merge
104strategy.
105
Junio C Hamanoedf80bd2013-04-05 22:14:36106--verify-signatures::
107--no-verify-signatures::
Junio C Hamano198b1f12016-05-17 22:27:24108Verify that the tip commit of the side branch being merged is
109signed with a valid key, i.e. a key that has a valid uid: in the
110default trust model, this means the signing key has been signed by
111a trusted key. If the tip commit of the side branch is not signed
112with a valid key, the merge is aborted.
Junio C Hamanoedf80bd2013-04-05 22:14:36113
Junio C Hamanoc21ab052009-10-31 04:03:55114--summary::
115--no-summary::
116Synonyms to --stat and --no-stat; these are deprecated and will be
117removed in the future.
118
Junio C Hamanoea90ab32010-03-15 20:32:55119ifndef::git-pull[]
Junio C Hamanoc21ab052009-10-31 04:03:55120-q::
121--quiet::
Junio C Hamanod2c978f2011-03-20 19:42:22122Operate quietly. Implies --no-progress.
Junio C Hamanoc21ab052009-10-31 04:03:55123
124-v::
125--verbose::
126Be verbose.
Junio C Hamanod2c978f2011-03-20 19:42:22127
128--progress::
129--no-progress::
130Turn progress on/off explicitly. If neither is specified,
131progress is shown if standard error is connected to a terminal.
132Note that not all merge strategies may support progress
133reporting.
134
Junio C Hamanoea90ab32010-03-15 20:32:55135endif::git-pull[]
Junio C Hamano7921e7c2016-04-29 21:55:09136
137--allow-unrelated-histories::
138By default, `git merge` command refuses to merge histories
139that do not share a common ancestor. This option can be
140used to override this safety when merging histories of two
141projects that started their lives independently. As that is
142a very rare occasion, no configuration variable to enable
143this by default exists and will not be added.