git-rebase.txt: use back-ticks consistently

While inspecting the 'git rebase' documentation, I noticed that it is inconsistent with how it uses back-ticks (or other punctuation) for identifying Git commands, command-line arguments, or values for those arguments. Sometimes, an argument (like '--interactive') would appear without any punctuation, causing the argument to not have any special formatting. Other times, arguments or 'git rebase' itself would have single-quotes giving a bold look (in the HTML documentation at least). By consistently using back-ticks, these types of strings appear in a monospace font with special highlighting to appear more clearly as text that exists in a command-line invocation of a Git command. This rather-large diff is the result of scanning git-rebase.txt and adding back-ticks as appropriate. Some are adding back-ticks where there was no punctuation. Others are replacing single quotes. There are also a few minor cleanups in the process, including those found by reviewers. Helped-by: Phillip Wood <phillip.wood123@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed Jun 29, 2022 at 13:21 UTC 54e51e559ec1df2dd709debcf28e6d7b1e515356
1 file changed +122 -120
Documentation/git-rebase.txt
+122 -120
@@ -16,40 +16,40 @@ SYNOPSIS
16
17 DESCRIPTION
18 -----------
19 -If <branch> is specified, 'git rebase' will perform an automatic
19 +If `<branch>` is specified, `git rebase` will perform an automatic
20 `git switch <branch>` before doing anything else. Otherwise
21 it remains on the current branch.
22
23 -If <upstream> is not specified, the upstream configured in
24 -branch.<name>.remote and branch.<name>.merge options will be used (see
23 +If `<upstream>` is not specified, the upstream configured in
24 +`branch.<name>.remote` and `branch.<name>.merge` options will be used (see
25 linkgit:git-config[1] for details) and the `--fork-point` option is
26 assumed. If you are currently not on any branch or if the current
27 branch does not have a configured upstream, the rebase will abort.
28
29 All changes made by commits in the current branch but that are not
30 -in <upstream> are saved to a temporary area. This is the same set
30 +in `<upstream>` are saved to a temporary area. This is the same set
31 of commits that would be shown by `git log <upstream>..HEAD`; or by
32 `git log 'fork_point'..HEAD`, if `--fork-point` is active (see the
33 description on `--fork-point` below); or by `git log HEAD`, if the
34 `--root` option is specified.
35
36 -The current branch is reset to <upstream>, or <newbase> if the
37 ---onto option was supplied. This has the exact same effect as
38 -`git reset --hard <upstream>` (or <newbase>). ORIG_HEAD is set
36 +The current branch is reset to `<upstream>` or `<newbase>` if the
37 +`--onto` option was supplied. This has the exact same effect as
38 +`git reset --hard <upstream>` (or `<newbase>`). `ORIG_HEAD` is set
39 to point at the tip of the branch before the reset.
40
41 The commits that were previously saved into the temporary area are
42 then reapplied to the current branch, one by one, in order. Note that
43 -any commits in HEAD which introduce the same textual changes as a commit
44 -in HEAD..<upstream> are omitted (i.e., a patch already accepted upstream
43 +any commits in `HEAD` which introduce the same textual changes as a commit
44 +in `HEAD..<upstream>` are omitted (i.e., a patch already accepted upstream
45 with a different commit message or timestamp will be skipped).
46
47 It is possible that a merge failure will prevent this process from being
48 completely automatic. You will have to resolve any such merge failure
49 and run `git rebase --continue`. Another option is to bypass the commit
50 that caused the merge failure with `git rebase --skip`. To check out the
51 -original <branch> and remove the .git/rebase-apply working files, use the
52 -command `git rebase --abort` instead.
51 +original `<branch>` and remove the `.git/rebase-apply` working files, use
52 +the command `git rebase --abort` instead.
53
54 Assume the following history exists and the current branch is "topic":
55
@@ -79,7 +79,7 @@ remain the checked-out branch.
79
80 If the upstream branch already contains a change you have made (e.g.,
81 because you mailed a patch which was applied upstream), then that commit
82 -will be skipped and warnings will be issued (if the `merge` backend is
82 +will be skipped and warnings will be issued (if the 'merge' backend is
83 used). For example, running `git rebase master` on the following
84 history (in which `A'` and `A` introduce the same set of changes, but
85 have different committer information):
@@ -176,11 +176,11 @@ would result in the removal of commits F and G:
176 ------------
177
178 This is useful if F and G were flawed in some way, or should not be
179 -part of topicA. Note that the argument to --onto and the <upstream>
179 +part of topicA. Note that the argument to `--onto` and the `<upstream>`
180 parameter can be any valid commit-ish.
181
182 -In case of conflict, 'git rebase' will stop at the first problematic commit
183 -and leave conflict markers in the tree. You can use 'git diff' to locate
182 +In case of conflict, `git rebase` will stop at the first problematic commit
183 +and leave conflict markers in the tree. You can use `git diff` to locate
184 the markers (<<<<<<) and make edits to resolve the conflict. For each
185 file you edit, you need to tell Git that the conflict has been resolved,
186 typically this would be done with
@@ -205,8 +205,8 @@ OPTIONS
205 -------
206 --onto <newbase>::
207 Starting point at which to create the new commits. If the
208 - --onto option is not specified, the starting point is
209 - <upstream>. May be any valid commit, and not just an
208 + `--onto` option is not specified, the starting point is
209 + `<upstream>`. May be any valid commit, and not just an
210 existing branch name.
211 +
212 As a special case, you may use "A\...B" as a shortcut for the
@@ -215,19 +215,19 @@ leave out at most one of A and B, in which case it defaults to HEAD.
215
216 --keep-base::
217 Set the starting point at which to create the new commits to the
218 - merge base of <upstream> and <branch>. Running
219 - 'git rebase --keep-base <upstream> <branch>' is equivalent to
218 + merge base of `<upstream>` and `<branch>`. Running
219 + `git rebase --keep-base <upstream> <branch>` is equivalent to
220 running
221 - 'git rebase --onto <upstream>...<branch> <upstream> <branch>'.
221 + `git rebase --onto <upstream>...<branch> <upstream> <branch>`.
222 +
223 This option is useful in the case where one is developing a feature on
224 top of an upstream branch. While the feature is being worked on, the
225 upstream branch may advance and it may not be the best idea to keep
226 rebasing on top of the upstream but to keep the base commit as-is.
227 +
228 -Although both this option and --fork-point find the merge base between
229 -<upstream> and <branch>, this option uses the merge base as the _starting
230 -point_ on which new commits will be created, whereas --fork-point uses
228 +Although both this option and `--fork-point` find the merge base between
229 +`<upstream>` and `<branch>`, this option uses the merge base as the _starting
230 +point_ on which new commits will be created, whereas `--fork-point` uses
231 the merge base to determine the _set of commits_ which will be rebased.
232 +
233 See also INCOMPATIBLE OPTIONS below.
@@ -238,23 +238,23 @@ See also INCOMPATIBLE OPTIONS below.
238 upstream for the current branch.
239
240 <branch>::
241 - Working branch; defaults to HEAD.
241 + Working branch; defaults to `HEAD`.
242
243 --continue::
244 Restart the rebasing process after having resolved a merge conflict.
245
246 --abort::
247 Abort the rebase operation and reset HEAD to the original
248 - branch. If <branch> was provided when the rebase operation was
249 - started, then HEAD will be reset to <branch>. Otherwise HEAD
248 + branch. If `<branch>` was provided when the rebase operation was
249 + started, then `HEAD` will be reset to `<branch>`. Otherwise `HEAD`
250 will be reset to where it was when the rebase operation was
251 started.
252
253 --quit::
254 - Abort the rebase operation but HEAD is not reset back to the
254 + Abort the rebase operation but `HEAD` is not reset back to the
255 original branch. The index and working tree are also left
256 unchanged as a result. If a temporary stash entry was created
257 - using --autostash, it will be saved to the stash list.
257 + using `--autostash`, it will be saved to the stash list.
258
259 --apply::
260 Use applying strategies to rebase (calling `git-am`
@@ -269,16 +269,16 @@ See also INCOMPATIBLE OPTIONS below.
269 empty after rebasing (because they contain a subset of already
270 upstream changes). With drop (the default), commits that
271 become empty are dropped. With keep, such commits are kept.
272 - With ask (implied by --interactive), the rebase will halt when
272 + With ask (implied by `--interactive`), the rebase will halt when
273 an empty commit is applied allowing you to choose whether to
274 drop it, edit files more, or just commit the empty changes.
275 - Other options, like --exec, will use the default of drop unless
276 - -i/--interactive is explicitly specified.
275 + Other options, like `--exec`, will use the default of drop unless
276 + `-i`/`--interactive` is explicitly specified.
277 +
278 -Note that commits which start empty are kept (unless --no-keep-empty
278 +Note that commits which start empty are kept (unless `--no-keep-empty`
279 is specified), and commits which are clean cherry-picks (as determined
280 by `git log --cherry-mark ...`) are detected and dropped as a
281 -preliminary step (unless --reapply-cherry-picks is passed).
281 +preliminary step (unless `--reapply-cherry-picks` is passed).
282 +
283 See also INCOMPATIBLE OPTIONS below.
284
@@ -287,7 +287,7 @@ See also INCOMPATIBLE OPTIONS below.
287 Do not keep commits that start empty before the rebase
288 (i.e. that do not change anything from its parent) in the
289 result. The default is to keep commits which start empty,
290 - since creating such commits requires passing the --allow-empty
290 + since creating such commits requires passing the `--allow-empty`
291 override flag to `git commit`, signifying that a user is very
292 intentionally creating such a commit and thus wants to keep
293 it.
@@ -299,7 +299,7 @@ flag exists as a convenient shortcut, such as for cases where external
299 tools generate many empty commits and you want them all removed.
300 +
301 For commits which do not start empty but become empty after rebasing,
302 -see the --empty flag.
302 +see the `--empty` flag.
303 +
304 See also INCOMPATIBLE OPTIONS below.
305
@@ -314,7 +314,7 @@ See also INCOMPATIBLE OPTIONS below.
314 By default (or if `--no-reapply-cherry-picks` is given), these commits
315 will be automatically dropped. Because this necessitates reading all
316 upstream commits, this can be expensive in repos with a large number
317 -of upstream commits that need to be read. When using the `merge`
317 +of upstream commits that need to be read. When using the 'merge'
318 backend, warnings will be issued for each dropped commit (unless
319 `--quiet` is given). Advice will also be issued unless
320 `advice.skippedCherryPicks` is set to false (see linkgit:git-config[1]).
@@ -348,10 +348,10 @@ See also INCOMPATIBLE OPTIONS below.
348 Using merging strategies to rebase (default).
349 +
350 Note that a rebase merge works by replaying each commit from the working
351 -branch on top of the <upstream> branch. Because of this, when a merge
351 +branch on top of the `<upstream>` branch. Because of this, when a merge
352 conflict happens, the side reported as 'ours' is the so-far rebased
353 -series, starting with <upstream>, and 'theirs' is the working branch. In
354 -other words, the sides are swapped.
353 +series, starting with `<upstream>`, and 'theirs' is the working branch.
354 +In other words, the sides are swapped.
355 +
356 See also INCOMPATIBLE OPTIONS below.
357
@@ -360,9 +360,9 @@ See also INCOMPATIBLE OPTIONS below.
360 Use the given merge strategy, instead of the default `ort`.
361 This implies `--merge`.
362 +
363 -Because 'git rebase' replays each commit from the working branch
364 -on top of the <upstream> branch using the given strategy, using
365 -the 'ours' strategy simply empties all patches from the <branch>,
363 +Because `git rebase` replays each commit from the working branch
364 +on top of the `<upstream>` branch using the given strategy, using
365 +the `ours` strategy simply empties all patches from the `<branch>`,
366 which makes little sense.
367 +
368 See also INCOMPATIBLE OPTIONS below.
@@ -392,11 +392,11 @@ See also INCOMPATIBLE OPTIONS below.
392
393 -q::
394 --quiet::
395 - Be quiet. Implies --no-stat.
395 + Be quiet. Implies `--no-stat`.
396
397 -v::
398 --verbose::
399 - Be verbose. Implies --stat.
399 + Be verbose. Implies `--stat`.
400
401 --stat::
402 Show a diffstat of what changed upstream since the last rebase. The
@@ -411,13 +411,13 @@ See also INCOMPATIBLE OPTIONS below.
411
412 --verify::
413 Allows the pre-rebase hook to run, which is the default. This option can
414 - be used to override --no-verify. See also linkgit:githooks[5].
414 + be used to override `--no-verify`. See also linkgit:githooks[5].
415
416 -C<n>::
417 - Ensure at least <n> lines of surrounding context match before
417 + Ensure at least `<n>` lines of surrounding context match before
418 and after each change. When fewer lines of surrounding
419 context exist they all must match. By default no context is
420 - ever ignored. Implies --apply.
420 + ever ignored. Implies `--apply`.
421 +
422 See also INCOMPATIBLE OPTIONS below.
423
@@ -436,21 +436,21 @@ details).
436
437 --fork-point::
438 --no-fork-point::
439 - Use reflog to find a better common ancestor between <upstream>
440 - and <branch> when calculating which commits have been
441 - introduced by <branch>.
439 + Use reflog to find a better common ancestor between `<upstream>`
440 + and `<branch>` when calculating which commits have been
441 + introduced by `<branch>`.
442 +
443 -When --fork-point is active, 'fork_point' will be used instead of
444 -<upstream> to calculate the set of commits to rebase, where
443 +When `--fork-point` is active, 'fork_point' will be used instead of
444 +`<upstream>` to calculate the set of commits to rebase, where
445 'fork_point' is the result of `git merge-base --fork-point <upstream>
446 <branch>` command (see linkgit:git-merge-base[1]). If 'fork_point'
447 -ends up being empty, the <upstream> will be used as a fallback.
447 +ends up being empty, the `<upstream>` will be used as a fallback.
448 +
449 -If <upstream> is given on the command line, then the default is
449 +If `<upstream>` is given on the command line, then the default is
450 `--no-fork-point`, otherwise the default is `--fork-point`. See also
451 `rebase.forkpoint` in linkgit:git-config[1].
452 +
453 -If your branch was based on <upstream> but <upstream> was rewound and
453 +If your branch was based on `<upstream>` but `<upstream>` was rewound and
454 your branch contains commits which were dropped, this option can be used
455 with `--keep-base` in order to drop those commits from your branch.
456 +
@@ -458,24 +458,26 @@ See also INCOMPATIBLE OPTIONS below.
458
459 --ignore-whitespace::
460 Ignore whitespace differences when trying to reconcile
461 -differences. Currently, each backend implements an approximation of
462 -this behavior:
461 + differences. Currently, each backend implements an approximation of
462 + this behavior:
463 +
464 -apply backend: When applying a patch, ignore changes in whitespace in
465 -context lines. Unfortunately, this means that if the "old" lines being
466 -replaced by the patch differ only in whitespace from the existing
467 -file, you will get a merge conflict instead of a successful patch
468 -application.
464 +apply backend;;
465 + When applying a patch, ignore changes in whitespace in context
466 + lines. Unfortunately, this means that if the "old" lines being
467 + replaced by the patch differ only in whitespace from the existing
468 + file, you will get a merge conflict instead of a successful patch
469 + application.
470 +
470 -merge backend: Treat lines with only whitespace changes as unchanged
471 -when merging. Unfortunately, this means that any patch hunks that were
472 -intended to modify whitespace and nothing else will be dropped, even
473 -if the other side had no changes that conflicted.
471 +merge backend;;
472 + Treat lines with only whitespace changes as unchanged when merging.
473 + Unfortunately, this means that any patch hunks that were intended
474 + to modify whitespace and nothing else will be dropped, even if the
475 + other side had no changes that conflicted.
476
477 --whitespace=<option>::
476 - This flag is passed to the 'git apply' program
478 + This flag is passed to the `git apply` program
479 (see linkgit:git-apply[1]) that applies the patch.
478 - Implies --apply.
480 + Implies `--apply`.
481 +
482 See also INCOMPATIBLE OPTIONS below.
483
@@ -537,7 +539,7 @@ See also REBASING MERGES and INCOMPATIBLE OPTIONS below.
539 -x <cmd>::
540 --exec <cmd>::
541 Append "exec <cmd>" after each line creating a commit in the
540 - final history. <cmd> will be interpreted as one or more shell
542 + final history. `<cmd>` will be interpreted as one or more shell
543 commands. Any command that fails will interrupt the rebase,
544 with exit code 1.
545 +
@@ -550,7 +552,7 @@ or by giving more than one `--exec`:
552 +
553 git rebase -i --exec "cmd1" --exec "cmd2" --exec ...
554 +
553 -If `--autosquash` is used, "exec" lines will not be appended for
555 +If `--autosquash` is used, `exec` lines will not be appended for
556 the intermediate commits, and will only appear at the end of each
557 squash/fixup series.
558 +
@@ -560,11 +562,12 @@ without an explicit `--interactive`.
562 See also INCOMPATIBLE OPTIONS below.
563
564 --root::
563 - Rebase all commits reachable from <branch>, instead of
564 - limiting them with an <upstream>. This allows you to rebase
565 - the root commit(s) on a branch. When used with --onto, it
566 - will skip changes already contained in <newbase> (instead of
567 - <upstream>) whereas without --onto it will operate on every change.
565 + Rebase all commits reachable from `<branch>`, instead of
566 + limiting them with an `<upstream>`. This allows you to rebase
567 + the root commit(s) on a branch. When used with `--onto`, it
568 + will skip changes already contained in `<newbase>` (instead of
569 + `<upstream>`) whereas without `--onto` it will operate on every
570 + change.
571 +
572 See also INCOMPATIBLE OPTIONS below.
573
@@ -643,9 +646,9 @@ In addition, the following pairs of options are incompatible:
646 BEHAVIORAL DIFFERENCES
647 -----------------------
648
646 -git rebase has two primary backends: apply and merge. (The apply
649 +`git rebase` has two primary backends: 'apply' and 'merge'. (The 'apply'
650 backend used to be known as the 'am' backend, but the name led to
648 -confusion as it looks like a verb instead of a noun. Also, the merge
651 +confusion as it looks like a verb instead of a noun. Also, the 'merge'
652 backend used to be known as the interactive backend, but it is now
653 used for non-interactive cases as well. Both were renamed based on
654 lower-level functionality that underpinned each.) There are some
@@ -654,19 +657,19 @@ subtle differences in how these two backends behave:
657 Empty commits
658 ~~~~~~~~~~~~~
659
657 -The apply backend unfortunately drops intentionally empty commits, i.e.
660 +The 'apply' backend unfortunately drops intentionally empty commits, i.e.
661 commits that started empty, though these are rare in practice. It
662 also drops commits that become empty and has no option for controlling
663 this behavior.
664
662 -The merge backend keeps intentionally empty commits by default (though
663 -with -i they are marked as empty in the todo list editor, or they can
664 -be dropped automatically with --no-keep-empty).
665 +The 'merge' backend keeps intentionally empty commits by default (though
666 +with `-i` they are marked as empty in the todo list editor, or they can
667 +be dropped automatically with `--no-keep-empty`).
668
669 Similar to the apply backend, by default the merge backend drops
667 -commits that become empty unless -i/--interactive is specified (in
670 +commits that become empty unless `-i`/`--interactive` is specified (in
671 which case it stops and asks the user what to do). The merge backend
669 -also has an --empty={drop,keep,ask} option for changing the behavior
672 +also has an `--empty={drop,keep,ask}` option for changing the behavior
673 of handling commits that become empty.
674
675 Directory rename detection
@@ -674,20 +677,20 @@ Directory rename detection
677
678 Due to the lack of accurate tree information (arising from
679 constructing fake ancestors with the limited information available in
677 -patches), directory rename detection is disabled in the apply backend.
680 +patches), directory rename detection is disabled in the 'apply' backend.
681 Disabled directory rename detection means that if one side of history
682 renames a directory and the other adds new files to the old directory,
683 then the new files will be left behind in the old directory without
684 any warning at the time of rebasing that you may want to move these
685 files into the new directory.
686
684 -Directory rename detection works with the merge backend to provide you
687 +Directory rename detection works with the 'merge' backend to provide you
688 warnings in such cases.
689
690 Context
691 ~~~~~~~
692
690 -The apply backend works by creating a sequence of patches (by calling
693 +The 'apply' backend works by creating a sequence of patches (by calling
694 `format-patch` internally), and then applying the patches in sequence
695 (calling `am` internally). Patches are composed of multiple hunks,
696 each with line numbers, a context region, and the actual changes. The
@@ -698,11 +701,11 @@ order to apply the changes to the right lines. However, if multiple
701 areas of the code have the same surrounding lines of context, the
702 wrong one can be picked. There are real-world cases where this has
703 caused commits to be reapplied incorrectly with no conflicts reported.
701 -Setting diff.context to a larger value may prevent such types of
704 +Setting `diff.context` to a larger value may prevent such types of
705 problems, but increases the chance of spurious conflicts (since it
706 will require more lines of matching context to apply).
707
705 -The merge backend works with a full copy of each relevant file,
708 +The 'merge' backend works with a full copy of each relevant file,
709 insulating it from these types of problems.
710
711 Labelling of conflicts markers
@@ -710,30 +713,30 @@ Labelling of conflicts markers
713
714 When there are content conflicts, the merge machinery tries to
715 annotate each side's conflict markers with the commits where the
713 -content came from. Since the apply backend drops the original
716 +content came from. Since the 'apply' backend drops the original
717 information about the rebased commits and their parents (and instead
718 generates new fake commits based off limited information in the
719 generated patches), those commits cannot be identified; instead it has
717 -to fall back to a commit summary. Also, when merge.conflictStyle is
718 -set to diff3 or zdiff3, the apply backend will use "constructed merge
720 +to fall back to a commit summary. Also, when `merge.conflictStyle` is
721 +set to `diff3` or `zdiff3`, the 'apply' backend will use "constructed merge
722 base" to label the content from the merge base, and thus provide no
723 information about the merge base commit whatsoever.
724
722 -The merge backend works with the full commits on both sides of history
725 +The 'merge' backend works with the full commits on both sides of history
726 and thus has no such limitations.
727
728 Hooks
729 ~~~~~
730
728 -The apply backend has not traditionally called the post-commit hook,
729 -while the merge backend has. Both have called the post-checkout hook,
730 -though the merge backend has squelched its output. Further, both
731 +The 'apply' backend has not traditionally called the post-commit hook,
732 +while the 'merge' backend has. Both have called the post-checkout hook,
733 +though the 'merge' backend has squelched its output. Further, both
734 backends only call the post-checkout hook with the starting point
735 commit of the rebase, not the intermediate commits nor the final
736 commit. In each case, the calling of these hooks was by accident of
737 implementation rather than by design (both backends were originally
738 implemented as shell scripts and happened to invoke other commands
736 -like 'git checkout' or 'git commit' that would call the hooks). Both
739 +like `git checkout` or `git commit` that would call the hooks). Both
740 backends should have the same behavior, though it is not entirely
741 clear which, if any, is correct. We will likely make rebase stop
742 calling either of these hooks in the future.
@@ -741,10 +744,10 @@ calling either of these hooks in the future.
744 Interruptability
745 ~~~~~~~~~~~~~~~~
746
744 -The apply backend has safety problems with an ill-timed interrupt; if
747 +The 'apply' backend has safety problems with an ill-timed interrupt; if
748 the user presses Ctrl-C at the wrong time to try to abort the rebase,
749 the rebase can enter a state where it cannot be aborted with a
747 -subsequent `git rebase --abort`. The merge backend does not appear to
750 +subsequent `git rebase --abort`. The 'merge' backend does not appear to
751 suffer from the same shortcoming. (See
752 https://lore.kernel.org/git/20200207132152.GC2868@szeder.dev/ for
753 details.)
@@ -756,8 +759,8 @@ When a conflict occurs while rebasing, rebase stops and asks the user
759 to resolve. Since the user may need to make notable changes while
760 resolving conflicts, after conflicts are resolved and the user has run
761 `git rebase --continue`, the rebase should open an editor and ask the
759 -user to update the commit message. The merge backend does this, while
760 -the apply backend blindly applies the original commit message.
762 +user to update the commit message. The 'merge' backend does this, while
763 +the 'apply' backend blindly applies the original commit message.
764
765 Miscellaneous differences
766 ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -777,23 +780,23 @@ completeness:
780 them to stderr.
781
782 * State directories: The two backends keep their state in different
780 - directories under .git/
783 + directories under `.git/`
784
785 include::merge-strategies.txt[]
786
787 NOTES
788 -----
789
787 -You should understand the implications of using 'git rebase' on a
790 +You should understand the implications of using `git rebase` on a
791 repository that you share. See also RECOVERING FROM UPSTREAM REBASE
792 below.
793
791 -When the git-rebase command is run, it will first execute a "pre-rebase"
792 -hook if one exists. You can use this hook to do sanity checks and
793 -reject the rebase if it isn't appropriate. Please see the template
794 -pre-rebase hook script for an example.
794 +When the rebase is run, it will first execute a `pre-rebase` hook if one
795 +exists. You can use this hook to do sanity checks and reject the rebase
796 +if it isn't appropriate. Please see the template `pre-rebase` hook script
797 +for an example.
798
796 -Upon completion, <branch> will be the current branch.
799 +Upon completion, `<branch>` will be the current branch.
800
801 INTERACTIVE MODE
802 ----------------
@@ -848,7 +851,7 @@ not look at them but at the commit names ("deadbee" and "fa1afe1" in this
851 example), so do not delete or edit the names.
852
853 By replacing the command "pick" with the command "edit", you can tell
851 -'git rebase' to stop after applying that commit, so that you can edit
854 +`git rebase` to stop after applying that commit, so that you can edit
855 the files and/or the commit message, amend the commit, and continue
856 rebasing.
857
@@ -876,14 +879,13 @@ commit, the message from the final one is used. You can also use
879 "fixup -C" to get the same behavior as "fixup -c" except without opening
880 an editor.
881
879 -
880 -'git rebase' will stop when "pick" has been replaced with "edit" or
882 +`git rebase` will stop when "pick" has been replaced with "edit" or
883 when a command fails due to merge errors. When you are done editing
884 and/or resolving conflicts you can continue with `git rebase --continue`.
885
886 For example, if you want to reorder the last 5 commits, such that what
885 -was HEAD~4 becomes the new HEAD. To achieve that, you would call
886 -'git rebase' like this:
887 +was `HEAD~4` becomes the new `HEAD`. To achieve that, you would call
888 +`git rebase` like this:
889
890 ----------------------
891 $ git rebase -i HEAD~5
@@ -903,7 +905,7 @@ like this:
905 ------------------
906
907 Suppose you want to rebase the side branch starting at "A" to "Q". Make
906 -sure that the current HEAD is "B", and call
908 +sure that the current `HEAD` is "B", and call
909
910 -----------------------------
911 $ git rebase -i -r --onto Q O
@@ -956,23 +958,23 @@ SPLITTING COMMITS
958 -----------------
959
960 In interactive mode, you can mark commits with the action "edit". However,
959 -this does not necessarily mean that 'git rebase' expects the result of this
961 +this does not necessarily mean that `git rebase` expects the result of this
962 edit to be exactly one commit. Indeed, you can undo the commit, or you can
963 add other commits. This can be used to split a commit into two:
964
965 - Start an interactive rebase with `git rebase -i <commit>^`, where
964 - <commit> is the commit you want to split. In fact, any commit range
966 + `<commit>` is the commit you want to split. In fact, any commit range
967 will do, as long as it contains that commit.
968
969 - Mark the commit you want to split with the action "edit".
970
971 - When it comes to editing that commit, execute `git reset HEAD^`. The
970 - effect is that the HEAD is rewound by one, and the index follows suit.
972 + effect is that the `HEAD` is rewound by one, and the index follows suit.
973 However, the working tree stays the same.
974
975 - Now add the changes to the index that you want to have in the first
976 commit. You can use `git add` (possibly interactively) or
975 - 'git gui' (or both) to do that.
977 + `git gui` (or both) to do that.
978
979 - Commit the now-current index with whatever commit message is appropriate
980 now.
@@ -983,7 +985,7 @@ add other commits. This can be used to split a commit into two:
985
986 If you are not absolutely sure that the intermediate revisions are
987 consistent (they compile, pass the testsuite, etc.) you should use
986 -'git stash' to stash away the not-yet-committed changes
988 +`git stash` to stash away the not-yet-committed changes
989 after each commit, test, and amend the commit if fixes are necessary.
990
991
@@ -1087,12 +1089,12 @@ NOTE: While an "easy case recovery" sometimes appears to be successful
1089 example, a commit that was removed via `git rebase
1090 --interactive` will be **resurrected**!
1091
1090 -The idea is to manually tell 'git rebase' "where the old 'subsystem'
1092 +The idea is to manually tell `git rebase` "where the old 'subsystem'
1093 ended and your 'topic' began", that is, what the old merge base
1094 between them was. You will have to find a way to name the last commit
1095 of the old 'subsystem', for example:
1096
1095 -* With the 'subsystem' reflog: after 'git fetch', the old tip of
1097 +* With the 'subsystem' reflog: after `git fetch`, the old tip of
1098 'subsystem' is at `subsystem@{1}`. Subsequent fetches will
1099 increase the number. (See linkgit:git-reflog[1].)
1100