Code

merge: backport GIT_MERGE_AUTOEDIT support
[git.git] / Documentation / merge-options.txt
1 --commit::
2 --no-commit::
3         Perform the merge and commit the result. This option can
4         be used to override --no-commit.
5 +
6 With --no-commit perform the merge but pretend the merge
7 failed and do not autocommit, to give the user a chance to
8 inspect and further tweak the merge result before committing.
10 --edit::
11 --no-edit::
12         Invoke editor before committing successful merge to further
13         edit the default merge message. The `--no-edit` option can be
14         used to accept the auto-generated message (this is generally
15         discouraged) when merging an annotated tag, in which case
16         `git merge` automatically spawns the editor so that the result
17         of the GPG verification of the tag can be seen.
18 +
19 Older scripts may depend on the historical behaviour of not allowing the
20 user to edit the merge log message. They will see an editor opened when
21 they run `git merge` to merge an annotated tag. To make it easier to adjust
22 such scripts to the updated behaviour, the environment variable
23 `GIT_MERGE_AUTOEDIT` can be set to `no` at the beginning of them.
25 --ff::
26         When the merge resolves as a fast-forward, only update the branch
27         pointer, without creating a merge commit.  This is the default
28         behavior.
30 --no-ff::
31         Create a merge commit even when the merge resolves as a
32         fast-forward.
34 --ff-only::
35         Refuse to merge and exit with a non-zero status unless the
36         current `HEAD` is already up-to-date or the merge can be
37         resolved as a fast-forward.
39 --log[=<n>]::
40 --no-log::
41         In addition to branch names, populate the log message with
42         one-line descriptions from at most <n> actual commits that are being
43         merged. See also linkgit:git-fmt-merge-msg[1].
44 +
45 With --no-log do not list one-line descriptions from the
46 actual commits being merged.
49 --stat::
50 -n::
51 --no-stat::
52         Show a diffstat at the end of the merge. The diffstat is also
53         controlled by the configuration option merge.stat.
54 +
55 With -n or --no-stat do not show a diffstat at the end of the
56 merge.
58 --squash::
59 --no-squash::
60         Produce the working tree and index state as if a real
61         merge happened (except for the merge information),
62         but do not actually make a commit or
63         move the `HEAD`, nor record `$GIT_DIR/MERGE_HEAD` to
64         cause the next `git commit` command to create a merge
65         commit.  This allows you to create a single commit on
66         top of the current branch whose effect is the same as
67         merging another branch (or more in case of an octopus).
68 +
69 With --no-squash perform the merge and commit the result. This
70 option can be used to override --squash.
72 -s <strategy>::
73 --strategy=<strategy>::
74         Use the given merge strategy; can be supplied more than
75         once to specify them in the order they should be tried.
76         If there is no `-s` option, a built-in list of strategies
77         is used instead ('git merge-recursive' when merging a single
78         head, 'git merge-octopus' otherwise).
80 -X <option>::
81 --strategy-option=<option>::
82         Pass merge strategy specific option through to the merge
83         strategy.
85 --summary::
86 --no-summary::
87         Synonyms to --stat and --no-stat; these are deprecated and will be
88         removed in the future.
90 ifndef::git-pull[]
91 -q::
92 --quiet::
93         Operate quietly. Implies --no-progress.
95 -v::
96 --verbose::
97         Be verbose.
99 --progress::
100 --no-progress::
101         Turn progress on/off explicitly. If neither is specified,
102         progress is shown if standard error is connected to a terminal.
103         Note that not all merge strategies may support progress
104         reporting.
106 endif::git-pull[]