Skip to content

Commit 3aea0da

Browse files
committed
Merge branch 'ml/doc-merge-updates' into maint-2.43
Doc update. * ml/doc-merge-updates: Documentation/git-merge.txt: use backticks for command wrapping Documentation/git-merge.txt: fix reference to synopsis
2 parents 974c936 + 63956c5 commit 3aea0da

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

Documentation/git-merge.txt

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ DESCRIPTION
2020
-----------
2121
Incorporates changes from the named commits (since the time their
2222
histories diverged from the current branch) into the current
23-
branch. This command is used by 'git pull' to incorporate changes
23+
branch. This command is used by `git pull` to incorporate changes
2424
from another repository and can be used by hand to merge changes
2525
from one branch into another.
2626

2727
Assume the following history exists and the current branch is
28-
"`master`":
28+
`master`:
2929

3030
------------
3131
A---B---C topic
3232
/
3333
D---E---F---G master
3434
------------
3535

36-
Then "`git merge topic`" will replay the changes made on the
36+
Then `git merge topic` will replay the changes made on the
3737
`topic` branch since it diverged from `master` (i.e., `E`) until
3838
its current commit (`C`) on top of `master`, and record the result
3939
in a new commit along with the names of the two parent commits and
@@ -46,21 +46,21 @@ a log message from the user describing the changes. Before the operation,
4646
D---E---F---G---H master
4747
------------
4848

49-
The second syntax ("`git merge --abort`") can only be run after the
50-
merge has resulted in conflicts. 'git merge --abort' will abort the
51-
merge process and try to reconstruct the pre-merge state. However,
52-
if there were uncommitted changes when the merge started (and
53-
especially if those changes were further modified after the merge
54-
was started), 'git merge --abort' will in some cases be unable to
55-
reconstruct the original (pre-merge) changes. Therefore:
49+
A merge stops if there's a conflict that cannot be resolved
50+
automatically or if `--no-commit` was provided when initiating the
51+
merge. At that point you can run `git merge --abort` or `git merge
52+
--continue`.
5653

57-
*Warning*: Running 'git merge' with non-trivial uncommitted changes is
54+
`git merge --abort` will abort the merge process and try to reconstruct
55+
the pre-merge state. However, if there were uncommitted changes when the
56+
merge started (and especially if those changes were further modified
57+
after the merge was started), `git merge --abort` will in some cases be
58+
unable to reconstruct the original (pre-merge) changes. Therefore:
59+
60+
*Warning*: Running `git merge` with non-trivial uncommitted changes is
5861
discouraged: while possible, it may leave you in a state that is hard to
5962
back out of in the case of a conflict.
6063

61-
The third syntax ("`git merge --continue`") can only be run after the
62-
merge has resulted in conflicts.
63-
6464
OPTIONS
6565
-------
6666
:git-merge: 1
@@ -74,8 +74,8 @@ include::merge-options.txt[]
7474
If `--log` is specified, a shortlog of the commits being merged
7575
will be appended to the specified message.
7676
+
77-
The 'git fmt-merge-msg' command can be
78-
used to give a good default for automated 'git merge'
77+
The `git fmt-merge-msg` command can be
78+
used to give a good default for automated `git merge`
7979
invocations. The automated message can include the branch description.
8080

8181
--into-name <branch>::
@@ -104,14 +104,14 @@ include::rerere-options.txt[]
104104
present, apply it to the worktree.
105105
+
106106
If there were uncommitted worktree changes present when the merge
107-
started, 'git merge --abort' will in some cases be unable to
107+
started, `git merge --abort` will in some cases be unable to
108108
reconstruct these changes. It is therefore recommended to always
109-
commit or stash your changes before running 'git merge'.
109+
commit or stash your changes before running `git merge`.
110110
+
111-
'git merge --abort' is equivalent to 'git reset --merge' when
111+
`git merge --abort` is equivalent to `git reset --merge` when
112112
`MERGE_HEAD` is present unless `MERGE_AUTOSTASH` is also present in
113-
which case 'git merge --abort' applies the stash entry to the worktree
114-
whereas 'git reset --merge' will save the stashed changes in the stash
113+
which case `git merge --abort` applies the stash entry to the worktree
114+
whereas `git reset --merge` will save the stashed changes in the stash
115115
list.
116116

117117
--quit::
@@ -120,8 +120,8 @@ list.
120120
stash entry will be saved to the stash list.
121121

122122
--continue::
123-
After a 'git merge' stops due to conflicts you can conclude the
124-
merge by running 'git merge --continue' (see "HOW TO RESOLVE
123+
After a `git merge` stops due to conflicts you can conclude the
124+
merge by running `git merge --continue` (see "HOW TO RESOLVE
125125
CONFLICTS" section below).
126126

127127
<commit>...::
@@ -144,25 +144,25 @@ PRE-MERGE CHECKS
144144
Before applying outside changes, you should get your own work in
145145
good shape and committed locally, so it will not be clobbered if
146146
there are conflicts. See also linkgit:git-stash[1].
147-
'git pull' and 'git merge' will stop without doing anything when
148-
local uncommitted changes overlap with files that 'git pull'/'git
149-
merge' may need to update.
147+
`git pull` and `git merge` will stop without doing anything when
148+
local uncommitted changes overlap with files that `git pull`/`git
149+
merge` may need to update.
150150

151151
To avoid recording unrelated changes in the merge commit,
152-
'git pull' and 'git merge' will also abort if there are any changes
152+
`git pull` and `git merge` will also abort if there are any changes
153153
registered in the index relative to the `HEAD` commit. (Special
154154
narrow exceptions to this rule may exist depending on which merge
155155
strategy is in use, but generally, the index must match HEAD.)
156156

157-
If all named commits are already ancestors of `HEAD`, 'git merge'
157+
If all named commits are already ancestors of `HEAD`, `git merge`
158158
will exit early with the message "Already up to date."
159159

160160
FAST-FORWARD MERGE
161161
------------------
162162

163163
Often the current branch head is an ancestor of the named commit.
164-
This is the most common case especially when invoked from 'git
165-
pull': you are tracking an upstream repository, you have committed
164+
This is the most common case especially when invoked from `git
165+
pull`: you are tracking an upstream repository, you have committed
166166
no local changes, and now you want to update to a newer upstream
167167
revision. In this case, a new commit is not needed to store the
168168
combined history; instead, the `HEAD` (along with the index) is
@@ -269,7 +269,7 @@ Barbie's remark on your side. The only thing you can tell is that your
269269
side wants to say it is hard and you'd prefer to go shopping, while the
270270
other side wants to claim it is easy.
271271

272-
An alternative style can be used by setting the "merge.conflictStyle"
272+
An alternative style can be used by setting the `merge.conflictStyle`
273273
configuration variable to either "diff3" or "zdiff3". In "diff3"
274274
style, the above conflict may look like this:
275275

@@ -328,10 +328,10 @@ After seeing a conflict, you can do two things:
328328

329329
* Resolve the conflicts. Git will mark the conflicts in
330330
the working tree. Edit the files into shape and
331-
'git add' them to the index. Use 'git commit' or
332-
'git merge --continue' to seal the deal. The latter command
331+
`git add` them to the index. Use `git commit` or
332+
`git merge --continue` to seal the deal. The latter command
333333
checks whether there is a (interrupted) merge in progress
334-
before calling 'git commit'.
334+
before calling `git commit`.
335335

336336
You can work through the conflict with a number of tools:
337337

@@ -392,7 +392,7 @@ CONFIGURATION
392392

393393
branch.<name>.mergeOptions::
394394
Sets default options for merging into branch <name>. The syntax and
395-
supported options are the same as those of 'git merge', but option
395+
supported options are the same as those of `git merge`, but option
396396
values containing whitespace characters are currently not supported.
397397

398398
include::includes/cmd-config-section-rest.txt[]

0 commit comments

Comments
 (0)