summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-18 13:40:32 -0700
committerJunio C Hamano <gitster@pobox.com>2022-07-18 13:40:32 -0700
commit9766dd37e7d543874fe13ac730c68c032bf5b0e2 (patch)
tree844bd84b77950b2110822be95905887d14b5124f
parentae2d874a965f920cc39147e22ad02afcf9c6be1b (diff)
downloadgit-htmldocs-9766dd37e7d543874fe13ac730c68c032bf5b0e2.tar.gz
Autogenerated HTML docs for v2.37.1-188-g71a8f
-rw-r--r--RelNotes/2.38.0.txt93
-rw-r--r--cmds-ancillaryinterrogators.txt2
-rw-r--r--git-config.html55
-rw-r--r--git-grep.html18
-rw-r--r--git-grep.txt9
-rw-r--r--git-merge-tree.html299
-rw-r--r--git-merge-tree.txt235
-rw-r--r--git-rebase.html257
-rw-r--r--git-rebase.txt242
-rw-r--r--git-rev-parse.html14
-rw-r--r--git.html2
-rw-r--r--gitrevisions.html14
-rw-r--r--howto/coordinate-embargoed-releases.html2
-rw-r--r--howto/keep-canonical-history-correct.html2
-rw-r--r--howto/maintain-git.html2
-rw-r--r--howto/new-command.html2
-rw-r--r--howto/rebase-from-internal-branch.html2
-rw-r--r--howto/rebuild-from-update-hook.html2
-rw-r--r--howto/recover-corrupted-blob-object.html2
-rw-r--r--howto/recover-corrupted-object-harder.html2
-rw-r--r--howto/revert-a-faulty-merge.html2
-rw-r--r--howto/revert-branch-rebase.html2
-rw-r--r--howto/separating-topic-branches.html2
-rw-r--r--howto/setup-git-server-over-http.html2
-rw-r--r--howto/update-hook-example.html2
-rw-r--r--howto/use-git-daemon.html2
-rw-r--r--howto/using-merge-subtree.html2
-rw-r--r--howto/using-signed-tag-in-pull-request.html2
-rw-r--r--revisions.txt15
29 files changed, 964 insertions, 323 deletions
diff --git a/RelNotes/2.38.0.txt b/RelNotes/2.38.0.txt
index f3e36b12f..380776325 100644
--- a/RelNotes/2.38.0.txt
+++ b/RelNotes/2.38.0.txt
@@ -1,11 +1,33 @@
Git v2.38 Release Notes
=======================
+UI, Workflows & Features
+
+ * "git remote show [-n] frotz" now pays attention to negative
+ pathspec.
+
+ * "git push" sometimes perform poorly when reachability bitmaps are
+ used, even in a repository where other operations are helped by
+ bitmaps. The push.useBitmaps configuration variable is introduced
+ to allow disabling use of reachability bitmaps only for "git push".
+
+ * "git grep -m<max-hits>" is a way to limit the hits shown per file.
+
+ * "git merge-tree" learned a new mode where it takes two commits and
+ computes a tree that would result in the merge commit, if the
+ histories leading to these two commits were to be merged.
+
+ * "git mv A B" in a sparsely populated working tree can be asked to
+ move a path between directories that are "in cone" (i.e. expected
+ to be materialized in the working tree) and "out of cone"
+ (i.e. expected to be hidden). The handling of such cases has been
+ improved.
+
+
Performance, Internal Implementation, Development Support etc.
* Collection of what is referenced by objects in promisor packs have
been optimized to inspect these objects in the in-pack order.
- (merge 18c08abc82 jk/optim-promisor-object-enumeration later to maint).
* Introduce a helper to see if a branch is already being worked on
(hence should not be newly checked out in a working tree), which
@@ -15,7 +37,33 @@ Performance, Internal Implementation, Development Support etc.
* Teach "git archive" to (optionally and then by default) avoid
spawning an external "gzip" process when creating ".tar.gz" (and
".tgz") archives.
- (merge 4f4be00d30 rs/archive-with-internal-gzip later to maint).
+
+ * Allow large objects read from a packstream to be streamed into a
+ loose object file straight, without having to keep it in-core as a
+ whole.
+
+ * Further preparation to turn git-submodule.sh into a builtin
+ continues.
+
+ * Apply Coccinelle rule to turn raw memmove() into MOVE_ARRAY() cpp
+ macro, which would improve maintainability and readability.
+
+ * Teach "make all" to build gitweb as well.
+
+ * Tweak tests so that they still work when the "git init" template
+ did not create .git/info directory.
+
+ * Add Coccinelle rules to detect the pattern of initializing and then
+ finalizing a structure without using it in between at all, which
+ happens after code restructuring and the compilers fail to
+ recognize as an unused variable.
+
+ * The code to convert between GPG trust level strings and internal
+ constants we use to represent them have been cleaned up.
+
+ * Support for libnettle as SHA256 implementation has been added.
+
+ * The way "git multi-pack" uses parse-options API has been improved.
Fixes since v2.37
@@ -33,8 +81,49 @@ Fixes since v2.37
add some missing information to the documentation.
(merge ac7667bd44 ac/bitmap-format-doc later to maint).
+ * Fixes for tests when the source directory has unusual characters in
+ its path, e.g. whitespaces, double-quotes, etc.
+ (merge eb1cd60290 ab/test-quoting-fix later to maint).
+
+ * "git mktree --missing" lazily fetched objects that are missing from
+ the local object store, which was totally unnecessary for the purpose
+ of creating the tree object(s) from its input.
+ (merge 817b0f6027 ro/mktree-allow-missing-fix later to maint).
+
+ * Give _() markings to fatal/warning/usage: labels that are shown in
+ front of these messages.
+ (merge a1fd2cf8cd dr/i18n-die-warn-error-usage later to maint).
+
+ * References to commands-to-be-typed-literally in "git rebase"
+ documentation mark-up have been corrected.
+ (merge 54e51e559e ds/git-rebase-doc-markup later to maint).
+
+ * In a non-bare repository, the behavior of Git when the
+ core.worktree configuration variable points at a directory that has
+ a repository as its subdirectory, regressed in Git 2.27 days.
+ (merge d6c9a71755 gg/worktree-from-the-above later to maint).
+
+ * Recent update to vimdiff layout code has been made more robust
+ against different end-user vim settings.
+ (merge f3d7623a13 fr/vimdiff-layout-fix later to maint).
+
+ * Plug various memory leaks.
+ (merge ece3974ba6 ab/leakfix later to maint).
+
+ * Plug various memory leaks in test-tool commands.
+ (merge f40a693450 ab/test-tool-leakfix later to maint).
+
+ * Fixes a long-standing corner case bug around directory renames in
+ the merge-ort strategy.
+ (merge 751e165424 en/merge-dual-dir-renames-fix later to maint).
+
* Other code cleanup, docfix, build fix, etc.
(merge 5fd9d1738e jk/revisions-doc-markup-fix later to maint).
(merge 1971510c35 pb/diff-doc-raw-format later to maint).
(merge a3ba4fa715 cr/setup-bug-typo later to maint).
(merge 85845580d9 ds/vscode-settings later to maint).
+ (merge ec2f6c0cca en/t6429-test-must-be-empty-fix later to maint).
+ (merge 14deb585fb tb/pack-objects-remove-pahole-comment later to maint).
+ (merge 2ffb7d13ee ds/t5510-brokequote later to maint).
+ (merge 18337d406f ll/ls-files-tests-update later to maint).
+ (merge 8cdab69d96 tk/rev-parse-doc-clarify-at-u later to maint).
diff --git a/cmds-ancillaryinterrogators.txt b/cmds-ancillaryinterrogators.txt
index 41324dffa..3058ab604 100644
--- a/cmds-ancillaryinterrogators.txt
+++ b/cmds-ancillaryinterrogators.txt
@@ -23,7 +23,7 @@ linkgit:git-instaweb[1]::
Instantly browse your working repository in gitweb.
linkgit:git-merge-tree[1]::
- Show three-way merge without touching index.
+ Perform merge without touching index or working tree.
linkgit:git-rerere[1]::
Reuse recorded resolution of conflicted merges.
diff --git a/git-config.html b/git-config.html
index d5385e1d6..a8241620e 100644
--- a/git-config.html
+++ b/git-config.html
@@ -2852,16 +2852,41 @@ core.bigFileThreshold
</dt>
<dd>
<p>
- Files larger than this size are stored deflated, without
- attempting delta compression. Storing large files without
- delta compression avoids excessive memory usage, at the
- slight expense of increased disk usage. Additionally files
- larger than this size are always treated as binary.
-</p>
-<div class="paragraph"><p>Default is 512 MiB on all platforms. This should be reasonable
-for most projects as source code and other text files can still
-be delta compressed, but larger binary media files won&#8217;t be.</p></div>
-<div class="paragraph"><p>Common unit suffixes of <em>k</em>, <em>m</em>, or <em>g</em> are supported.</p></div>
+ The size of files considered "big", which as discussed below
+ changes the behavior of numerous git commands, as well as how
+ such files are stored within the repository. The default is
+ 512 MiB. Common unit suffixes of <em>k</em>, <em>m</em>, or <em>g</em> are
+ supported.
+</p>
+<div class="paragraph"><p>Files above the configured limit will be:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Stored deflated in packfiles, without attempting delta compression.
+</p>
+<div class="paragraph"><p>The default limit is primarily set with this use-case in mind. With it,
+most projects will have their source code and other text files delta
+compressed, but not larger binary media files.</p></div>
+<div class="paragraph"><p>Storing large files without delta compression avoids excessive memory
+usage, at the slight expense of increased disk usage.</p></div>
+</li>
+<li>
+<p>
+Will be treated as if they were labeled "binary" (see
+ <a href="gitattributes.html">gitattributes(5)</a>). e.g. <a href="git-log.html">git-log(1)</a> and
+ <a href="git-diff.html">git-diff(1)</a> will not compute diffs for files above this limit.
+</p>
+</li>
+<li>
+<p>
+Will generally be streamed when written, which avoids excessive
+memory usage, at the cost of some fixed overhead. Commands that make
+use of this include <a href="git-archive.html">git-archive(1)</a>,
+<a href="git-fast-import.html">git-fast-import(1)</a>, <a href="git-index-pack.html">git-index-pack(1)</a>,
+<a href="git-unpack-objects.html">git-unpack-objects(1)</a> and <a href="git-fsck.html">git-fsck(1)</a>.
+</p>
+</li>
+</ul></div>
</dd>
<dt class="hdlist1">
core.excludesFile
@@ -9136,6 +9161,16 @@ push.negotiate
</p>
</dd>
<dt class="hdlist1">
+push.useBitmaps
+</dt>
+<dd>
+<p>
+ If set to "false", disable use of bitmaps for "git push" even if
+ <code>pack.useBitmaps</code> is "true", without preventing other git operations
+ from using bitmaps. Default is true.
+</p>
+</dd>
+<dt class="hdlist1">
rebase.backend
</dt>
<dd>
diff --git a/git-grep.html b/git-grep.html
index 818a39e18..02e170084 100644
--- a/git-grep.html
+++ b/git-grep.html
@@ -763,6 +763,7 @@ git-grep(1) Manual Page
[--break] [--heading] [-p | --show-function]
[-A &lt;post-context&gt;] [-B &lt;pre-context&gt;] [-C &lt;context&gt;]
[-W | --function-context]
+ [(-m | --max-count) &lt;num&gt;]
[--threads &lt;num&gt;]
[-f &lt;file&gt;] [-e] &lt;pattern&gt;
[--and|--or|--not|(|)|-e &lt;pattern&gt;&#8230;]
@@ -1221,6 +1222,21 @@ providing this option will cause it to die.</p></div>
</p>
</dd>
<dt class="hdlist1">
+-m &lt;num&gt;
+</dt>
+<dt class="hdlist1">
+--max-count &lt;num&gt;
+</dt>
+<dd>
+<p>
+ Limit the amount of matches per file. When using the <code>-v</code> or
+ <code>--invert-match</code> option, the search stops after the specified
+ number of non-matches. A value of -1 will return unlimited
+ results (the default). A value of 0 will exit immediately with
+ a non-zero status.
+</p>
+</dd>
+<dt class="hdlist1">
--threads &lt;num&gt;
</dt>
<dd>
@@ -1469,7 +1485,7 @@ grep.fallbackToNoIndex
<div id="footer">
<div id="footer-text">
Last updated
- 2021-05-06 21:22:01 PDT
+ 2022-07-18 13:37:02 PDT
</div>
</div>
</body>
diff --git a/git-grep.txt b/git-grep.txt
index 3d393fbac..58d944bd5 100644
--- a/git-grep.txt
+++ b/git-grep.txt
@@ -23,6 +23,7 @@ SYNOPSIS
[--break] [--heading] [-p | --show-function]
[-A <post-context>] [-B <pre-context>] [-C <context>]
[-W | --function-context]
+ [(-m | --max-count) <num>]
[--threads <num>]
[-f <file>] [-e] <pattern>
[--and|--or|--not|(|)|-e <pattern>...]
@@ -238,6 +239,14 @@ providing this option will cause it to die.
`git diff` works out patch hunk headers (see 'Defining a
custom hunk-header' in linkgit:gitattributes[5]).
+-m <num>::
+--max-count <num>::
+ Limit the amount of matches per file. When using the `-v` or
+ `--invert-match` option, the search stops after the specified
+ number of non-matches. A value of -1 will return unlimited
+ results (the default). A value of 0 will exit immediately with
+ a non-zero status.
+
--threads <num>::
Number of grep worker threads to use.
See `grep.threads` in 'CONFIGURATION' for more information.
diff --git a/git-merge-tree.html b/git-merge-tree.html
index 598c68c23..6a6e5f9b4 100644
--- a/git-merge-tree.html
+++ b/git-merge-tree.html
@@ -740,7 +740,7 @@ git-merge-tree(1) Manual Page
<h2>NAME</h2>
<div class="sectionbody">
<p>git-merge-tree -
- Show three-way merge without touching index
+ Perform merge without touching index or working tree
</p>
</div>
</div>
@@ -749,23 +749,296 @@ git-merge-tree(1) Manual Page
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<pre class="content"><em>git merge-tree</em> &lt;base-tree&gt; &lt;branch1&gt; &lt;branch2&gt;</pre>
+<pre class="content"><em>git merge-tree</em> [--write-tree] [&lt;options&gt;] &lt;branch1&gt; &lt;branch2&gt;
+<em>git merge-tree</em> [--trivial-merge] &lt;base-tree&gt; &lt;branch1&gt; &lt;branch2&gt; (deprecated)</pre>
<div class="attribution">
</div></div>
</div>
</div>
<div class="sect1">
-<h2 id="_description">DESCRIPTION</h2>
+<h2 id="NEWMERGE">DESCRIPTION</h2>
<div class="sectionbody">
-<div class="paragraph"><p>Reads three tree-ish, and output trivial merge results and
-conflicting stages to the standard output. This is similar to
-what three-way <em>git read-tree -m</em> does, but instead of storing the
-results in the index, the command outputs the entries to the
-standard output.</p></div>
-<div class="paragraph"><p>This is meant to be used by higher level scripts to compute
-merge results outside of the index, and stuff the results back into the
-index. For this reason, the output from the command omits
-entries that match the &lt;branch1&gt; tree.</p></div>
+<div class="paragraph"><p>This command has a modern <code>--write-tree</code> mode and a deprecated
+<code>--trivial-merge</code> mode. With the exception of the
+<a href="#DEPMERGE">DEPRECATED DESCRIPTION</a> section at the end, the rest of
+this documentation describes modern <code>--write-tree</code> mode.</p></div>
+<div class="paragraph"><p>Performs a merge, but does not make any new commits and does not read
+from or write to either the working tree or index.</p></div>
+<div class="paragraph"><p>The performed merge will use the same feature as the "real"
+<a href="git-merge.html">git-merge(1)</a>, including:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+three way content merges of individual files
+</p>
+</li>
+<li>
+<p>
+rename detection
+</p>
+</li>
+<li>
+<p>
+proper directory/file conflict handling
+</p>
+</li>
+<li>
+<p>
+recursive ancestor consolidation (i.e. when there is more than one
+ merge base, creating a virtual merge base by merging the merge bases)
+</p>
+</li>
+<li>
+<p>
+etc.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>After the merge completes, a new toplevel tree object is created. See
+<code>OUTPUT</code> below for details.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-z
+</dt>
+<dd>
+<p>
+ Do not quote filenames in the &lt;Conflicted file info&gt; section,
+ and end each filename with a NUL character rather than
+ newline. Also begin the messages section with a NUL character
+ instead of a newline. See <a href="#OUTPUT">[OUTPUT]</a> below for more information.
+</p>
+</dd>
+<dt class="hdlist1">
+--name-only
+</dt>
+<dd>
+<p>
+ In the Conflicted file info section, instead of writing a list
+ of (mode, oid, stage, path) tuples to output for conflicted
+ files, just provide a list of filenames with conflicts (and
+ do not list filenames multiple times if they have multiple
+ conflicting stages).
+</p>
+</dd>
+<dt class="hdlist1">
+--[no-]messages
+</dt>
+<dd>
+<p>
+ Write any informational messages such as "Auto-merging &lt;path&gt;"
+ or CONFLICT notices to the end of stdout. If unspecified, the
+ default is to include these messages if there are merge
+ conflicts, and to omit them otherwise.
+</p>
+</dd>
+<dt class="hdlist1">
+--allow-unrelated-histories
+</dt>
+<dd>
+<p>
+ merge-tree will by default error out if the two branches specified
+ share no common history. This flag can be given to override that
+ check and make the merge proceed anyway.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="OUTPUT">OUTPUT</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For a successful merge, the output from git-merge-tree is simply one
+line:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>&lt;OID of toplevel tree&gt;</code></pre>
+</div></div>
+<div class="paragraph"><p>Whereas for a conflicted merge, the output is by default of the form:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>&lt;OID of toplevel tree&gt;
+&lt;Conflicted file info&gt;
+&lt;Informational messages&gt;</code></pre>
+</div></div>
+<div class="paragraph"><p>These are discussed individually below.</p></div>
+<div class="sect2">
+<h3 id="OIDTLT">OID of toplevel tree</h3>
+<div class="paragraph"><p>This is a tree object that represents what would be checked out in the
+working tree at the end of <code>git merge</code>. If there were conflicts, then
+files within this tree may have embedded conflict markers. This section
+is always followed by a newline (or NUL if <code>-z</code> is passed).</p></div>
+</div>
+<div class="sect2">
+<h3 id="CFI">Conflicted file info</h3>
+<div class="paragraph"><p>This is a sequence of lines with the format</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>&lt;mode&gt; &lt;object&gt; &lt;stage&gt; &lt;filename&gt;</code></pre>
+</div></div>
+<div class="paragraph"><p>The filename will be quoted as explained for the configuration
+variable <code>core.quotePath</code> (see <a href="git-config.html">git-config(1)</a>). However, if
+the <code>--name-only</code> option is passed, the mode, object, and stage will
+be omitted. If <code>-z</code> is passed, the "lines" are terminated by a NUL
+character instead of a newline character.</p></div>
+</div>
+<div class="sect2">
+<h3 id="IM">Informational messages</h3>
+<div class="paragraph"><p>This always starts with a blank line (or NUL if <code>-z</code> is passed) to
+separate it from the previous sections, and then has free-form
+messages about the merge, such as:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+"Auto-merging &lt;file&gt;"
+</p>
+</li>
+<li>
+<p>
+"CONFLICT (rename/delete): &lt;oldfile&gt; renamed&#8230;but deleted in&#8230;"
+</p>
+</li>
+<li>
+<p>
+"Failed to merge submodule &lt;submodule&gt; (&lt;reason&gt;)"
+</p>
+</li>
+<li>
+<p>
+"Warning: cannot merge binary files: &lt;filename&gt;"
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Note that these free-form messages will never have a NUL character
+in or between them, even if -z is passed. It is simply a large block
+of text taking up the remainder of the output.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exit_status">EXIT STATUS</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For a successful, non-conflicted merge, the exit status is 0. When the
+merge has conflicts, the exit status is 1. If the merge is not able to
+complete (or start) due to some kind of error, the exit status is
+something other than 0 or 1 (and the output is unspecified).</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage_notes">USAGE NOTES</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This command is intended as low-level plumbing, similar to
+<a href="git-hash-object.html">git-hash-object(1)</a>, <a href="git-mktree.html">git-mktree(1)</a>,
+<a href="git-commit-tree.html">git-commit-tree(1)</a>, <a href="git-write-tree.html">git-write-tree(1)</a>,
+<a href="git-update-ref.html">git-update-ref(1)</a>, and <a href="git-mktag.html">git-mktag(1)</a>. Thus, it can be
+used as a part of a series of steps such as:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2)
+test $? -eq 0 || die "There were conflicts..."
+NEWCOMMIT=$(git commit-tree $NEWTREE -p $BRANCH1 -p $BRANCH2)
+git update-ref $BRANCH1 $NEWCOMMIT</code></pre>
+</div></div>
+<div class="paragraph"><p>Note that when the exit status is non-zero, <code>NEWTREE</code> in this sequence
+will contain a lot more output than just a tree.</p></div>
+<div class="paragraph"><p>For conflicts, the output includes the same information that you&#8217;d get
+with <a href="git-merge.html">git-merge(1)</a>:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+what would be written to the working tree (the
+ <a href="#OIDTLT">OID of toplevel tree</a>)
+</p>
+</li>
+<li>
+<p>
+the higher order stages that would be written to the index (the
+ <a href="#CFI">Conflicted file info</a>)
+</p>
+</li>
+<li>
+<p>
+any messages that would have been printed to stdout (the
+ <a href="#IM">Informational messages</a>)
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_mistakes_to_avoid">MISTAKES TO AVOID</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Do NOT look through the resulting toplevel tree to try to find which
+files conflict; parse the <a href="#CFI">Conflicted file info</a> section instead.
+Not only would parsing an entire tree be horrendously slow in large
+repositories, there are numerous types of conflicts not representable by
+conflict markers (modify/delete, mode conflict, binary file changed on
+both sides, file/directory conflicts, various rename conflict
+permutations, etc.)</p></div>
+<div class="paragraph"><p>Do NOT interpret an empty <a href="#CFI">Conflicted file info</a> list as a clean
+merge; check the exit status. A merge can have conflicts without having
+individual files conflict (there are a few types of directory rename
+conflicts that fall into this category, and others might also be added
+in the future).</p></div>
+<div class="paragraph"><p>Do NOT attempt to guess or make the user guess the conflict types from
+the <a href="#CFI">Conflicted file info</a> list. The information there is
+insufficient to do so. For example: Rename/rename(1to2) conflicts (both
+sides renamed the same file differently) will result in three different
+file having higher order stages (but each only has one higher order
+stage), with no way (short of the <a href="#IM">Informational messages</a> section)
+to determine which three files are related. File/directory conflicts
+also result in a file with exactly one higher order stage.
+Possibly-involved-in-directory-rename conflicts (when
+"merge.directoryRenames" is unset or set to "conflicts") also result in
+a file with exactly one higher order stage. In all cases, the
+<a href="#IM">Informational messages</a> section has the necessary info, though it
+is not designed to be machine parseable.</p></div>
+<div class="paragraph"><p>Do NOT assume that each paths from <a href="#CFI">Conflicted file info</a>, and
+the logical conflicts in the <a href="#IM">Informational messages</a> have a
+one-to-one mapping, nor that there is a one-to-many mapping, nor a
+many-to-one mapping. Many-to-many mappings exist, meaning that each
+path can have many logical conflict types in a single merge, and each
+logical conflict type can affect many paths.</p></div>
+<div class="paragraph"><p>Do NOT assume all filenames listed in the <a href="#IM">Informational messages</a>
+section had conflicts. Messages can be included for files that have no
+conflicts, such as "Auto-merging &lt;file&gt;".</p></div>
+<div class="paragraph"><p>AVOID taking the OIDS from the <a href="#CFI">Conflicted file info</a> and
+re-merging them to present the conflicts to the user. This will lose
+information. Instead, look up the version of the file found within the
+<a href="#OIDTLT">OID of toplevel tree</a> and show that instead. In particular,
+the latter will have conflict markers annotated with the original
+branch/commit being merged and, if renames were involved, the original
+filename. While you could include the original branch/commit in the
+conflict marker annotations when re-merging, the original filename is
+not available from the <a href="#CFI">Conflicted file info</a> and thus you would
+be losing information that might help the user resolve the conflict.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="DEPMERGE">DEPRECATED DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Per the <a href="#NEWMERGE">DESCRIPTION</a> and unlike the rest of this
+documentation, this section describes the deprecated <code>--trivial-merge</code>
+mode.</p></div>
+<div class="paragraph"><p>Other than the optional <code>--trivial-merge</code>, this mode accepts no
+options.</p></div>
+<div class="paragraph"><p>This mode reads three tree-ish, and outputs trivial merge results and
+conflicting stages to the standard output in a semi-diff format.
+Since this was designed for higher level scripts to consume and merge
+the results back into the index, it omits entries that match
+&lt;branch1&gt;. The result of this second form is similar to what
+three-way <em>git read-tree -m</em> does, but instead of storing the results
+in the index, the command outputs the entries to the standard output.</p></div>
+<div class="paragraph"><p>This form not only has limited applicability (a trivial merge cannot
+handle content merges of individual files, rename detection, proper
+directory/file conflict handling, etc.), the output format is also
+difficult to work with, and it will generally be less performant than
+the first form even on successful merges (especially if working in
+large repositories).</p></div>
</div>
</div>
<div class="sect1">
@@ -779,7 +1052,7 @@ entries that match the &lt;branch1&gt; tree.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2020-03-10 15:02:33 PDT
+ 2022-07-18 13:37:02 PDT
</div>
</div>
</body>
diff --git a/git-merge-tree.txt b/git-merge-tree.txt
index 58731c194..d6c356740 100644
--- a/git-merge-tree.txt
+++ b/git-merge-tree.txt
@@ -3,26 +3,237 @@ git-merge-tree(1)
NAME
----
-git-merge-tree - Show three-way merge without touching index
+git-merge-tree - Perform merge without touching index or working tree
SYNOPSIS
--------
[verse]
-'git merge-tree' <base-tree> <branch1> <branch2>
+'git merge-tree' [--write-tree] [<options>] <branch1> <branch2>
+'git merge-tree' [--trivial-merge] <base-tree> <branch1> <branch2> (deprecated)
+[[NEWMERGE]]
DESCRIPTION
-----------
-Reads three tree-ish, and output trivial merge results and
-conflicting stages to the standard output. This is similar to
-what three-way 'git read-tree -m' does, but instead of storing the
-results in the index, the command outputs the entries to the
-standard output.
-
-This is meant to be used by higher level scripts to compute
-merge results outside of the index, and stuff the results back into the
-index. For this reason, the output from the command omits
-entries that match the <branch1> tree.
+
+This command has a modern `--write-tree` mode and a deprecated
+`--trivial-merge` mode. With the exception of the
+<<DEPMERGE,DEPRECATED DESCRIPTION>> section at the end, the rest of
+this documentation describes modern `--write-tree` mode.
+
+Performs a merge, but does not make any new commits and does not read
+from or write to either the working tree or index.
+
+The performed merge will use the same feature as the "real"
+linkgit:git-merge[1], including:
+
+ * three way content merges of individual files
+ * rename detection
+ * proper directory/file conflict handling
+ * recursive ancestor consolidation (i.e. when there is more than one
+ merge base, creating a virtual merge base by merging the merge bases)
+ * etc.
+
+After the merge completes, a new toplevel tree object is created. See
+`OUTPUT` below for details.
+
+OPTIONS
+-------
+
+-z::
+ Do not quote filenames in the <Conflicted file info> section,
+ and end each filename with a NUL character rather than
+ newline. Also begin the messages section with a NUL character
+ instead of a newline. See <<OUTPUT>> below for more information.
+
+--name-only::
+ In the Conflicted file info section, instead of writing a list
+ of (mode, oid, stage, path) tuples to output for conflicted
+ files, just provide a list of filenames with conflicts (and
+ do not list filenames multiple times if they have multiple
+ conflicting stages).
+
+--[no-]messages::
+ Write any informational messages such as "Auto-merging <path>"
+ or CONFLICT notices to the end of stdout. If unspecified, the
+ default is to include these messages if there are merge
+ conflicts, and to omit them otherwise.
+
+--allow-unrelated-histories::
+ merge-tree will by default error out if the two branches specified
+ share no common history. This flag can be given to override that
+ check and make the merge proceed anyway.
+
+[[OUTPUT]]
+OUTPUT
+------
+
+For a successful merge, the output from git-merge-tree is simply one
+line:
+
+ <OID of toplevel tree>
+
+Whereas for a conflicted merge, the output is by default of the form:
+
+ <OID of toplevel tree>
+ <Conflicted file info>
+ <Informational messages>
+
+These are discussed individually below.
+
+[[OIDTLT]]
+OID of toplevel tree
+~~~~~~~~~~~~~~~~~~~~
+
+This is a tree object that represents what would be checked out in the
+working tree at the end of `git merge`. If there were conflicts, then
+files within this tree may have embedded conflict markers. This section
+is always followed by a newline (or NUL if `-z` is passed).
+
+[[CFI]]
+Conflicted file info
+~~~~~~~~~~~~~~~~~~~~
+
+This is a sequence of lines with the format
+
+ <mode> <object> <stage> <filename>
+
+The filename will be quoted as explained for the configuration
+variable `core.quotePath` (see linkgit:git-config[1]). However, if
+the `--name-only` option is passed, the mode, object, and stage will
+be omitted. If `-z` is passed, the "lines" are terminated by a NUL
+character instead of a newline character.
+
+[[IM]]
+Informational messages
+~~~~~~~~~~~~~~~~~~~~~~
+
+This always starts with a blank line (or NUL if `-z` is passed) to
+separate it from the previous sections, and then has free-form
+messages about the merge, such as:
+
+ * "Auto-merging <file>"
+ * "CONFLICT (rename/delete): <oldfile> renamed...but deleted in..."
+ * "Failed to merge submodule <submodule> (<reason>)"
+ * "Warning: cannot merge binary files: <filename>"
+
+Note that these free-form messages will never have a NUL character
+in or between them, even if -z is passed. It is simply a large block
+of text taking up the remainder of the output.
+
+EXIT STATUS
+-----------
+
+For a successful, non-conflicted merge, the exit status is 0. When the
+merge has conflicts, the exit status is 1. If the merge is not able to
+complete (or start) due to some kind of error, the exit status is
+something other than 0 or 1 (and the output is unspecified).
+
+USAGE NOTES
+-----------
+
+This command is intended as low-level plumbing, similar to
+linkgit:git-hash-object[1], linkgit:git-mktree[1],
+linkgit:git-commit-tree[1], linkgit:git-write-tree[1],
+linkgit:git-update-ref[1], and linkgit:git-mktag[1]. Thus, it can be
+used as a part of a series of steps such as:
+
+ NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2)
+ test $? -eq 0 || die "There were conflicts..."
+ NEWCOMMIT=$(git commit-tree $NEWTREE -p $BRANCH1 -p $BRANCH2)
+ git update-ref $BRANCH1 $NEWCOMMIT
+
+Note that when the exit status is non-zero, `NEWTREE` in this sequence
+will contain a lot more output than just a tree.
+
+For conflicts, the output includes the same information that you'd get
+with linkgit:git-merge[1]:
+
+ * what would be written to the working tree (the
+ <<OIDTLT,OID of toplevel tree>>)
+ * the higher order stages that would be written to the index (the
+ <<CFI,Conflicted file info>>)
+ * any messages that would have been printed to stdout (the
+ <<IM,Informational messages>>)
+
+MISTAKES TO AVOID
+-----------------
+
+Do NOT look through the resulting toplevel tree to try to find which
+files conflict; parse the <<CFI,Conflicted file info>> section instead.
+Not only would parsing an entire tree be horrendously slow in large
+repositories, there are numerous types of conflicts not representable by
+conflict markers (modify/delete, mode conflict, binary file changed on
+both sides, file/directory conflicts, various rename conflict
+permutations, etc.)
+
+Do NOT interpret an empty <<CFI,Conflicted file info>> list as a clean
+merge; check the exit status. A merge can have conflicts without having
+individual files conflict (there are a few types of directory rename
+conflicts that fall into this category, and others might also be added
+in the future).
+
+Do NOT attempt to guess or make the user guess the conflict types from
+the <<CFI,Conflicted file info>> list. The information there is
+insufficient to do so. For example: Rename/rename(1to2) conflicts (both
+sides renamed the same file differently) will result in three different
+file having higher order stages (but each only has one higher order
+stage), with no way (short of the <<IM,Informational messages>> section)
+to determine which three files are related. File/directory conflicts
+also result in a file with exactly one higher order stage.
+Possibly-involved-in-directory-rename conflicts (when
+"merge.directoryRenames" is unset or set to "conflicts") also result in
+a file with exactly one higher order stage. In all cases, the
+<<IM,Informational messages>> section has the necessary info, though it
+is not designed to be machine parseable.
+
+Do NOT assume that each paths from <<CFI,Conflicted file info>>, and
+the logical conflicts in the <<IM,Informational messages>> have a
+one-to-one mapping, nor that there is a one-to-many mapping, nor a
+many-to-one mapping. Many-to-many mappings exist, meaning that each
+path can have many logical conflict types in a single merge, and each
+logical conflict type can affect many paths.
+
+Do NOT assume all filenames listed in the <<IM,Informational messages>>
+section had conflicts. Messages can be included for files that have no
+conflicts, such as "Auto-merging <file>".
+
+AVOID taking the OIDS from the <<CFI,Conflicted file info>> and
+re-merging them to present the conflicts to the user. This will lose
+information. Instead, look up the version of the file found within the
+<<OIDTLT,OID of toplevel tree>> and show that instead. In particular,
+the latter will have conflict markers annotated with the original
+branch/commit being merged and, if renames were involved, the original
+filename. While you could include the original branch/commit in the
+conflict marker annotations when re-merging, the original filename is
+not available from the <<CFI,Conflicted file info>> and thus you would
+be losing information that might help the user resolve the conflict.
+
+[[DEPMERGE]]
+DEPRECATED DESCRIPTION
+----------------------
+
+Per the <<NEWMERGE,DESCRIPTION>> and unlike the rest of this
+documentation, this section describes the deprecated `--trivial-merge`
+mode.
+
+Other than the optional `--trivial-merge`, this mode accepts no
+options.
+
+This mode reads three tree-ish, and outputs trivial merge results and
+conflicting stages to the standard output in a semi-diff format.
+Since this was designed for higher level scripts to consume and merge
+the results back into the index, it omits entries that match
+<branch1>. The result of this second form is similar to what
+three-way 'git read-tree -m' does, but instead of storing the results
+in the index, the command outputs the entries to the standard output.
+
+This form not only has limited applicability (a trivial merge cannot
+handle content merges of individual files, rename detection, proper
+directory/file conflict handling, etc.), the output format is also
+difficult to work with, and it will generally be less performant than
+the first form even on successful merges (especially if working in
+large repositories).
GIT
---
diff --git a/git-rebase.html b/git-rebase.html
index 16787a6b6..763c127da 100644
--- a/git-rebase.html
+++ b/git-rebase.html
@@ -761,35 +761,35 @@ git-rebase(1) Manual Page
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
-<div class="paragraph"><p>If &lt;branch&gt; is specified, <em>git rebase</em> will perform an automatic
+<div class="paragraph"><p>If <code>&lt;branch&gt;</code> is specified, <code>git rebase</code> will perform an automatic
<code>git switch &lt;branch&gt;</code> before doing anything else. Otherwise
it remains on the current branch.</p></div>
-<div class="paragraph"><p>If &lt;upstream&gt; is not specified, the upstream configured in
-branch.&lt;name&gt;.remote and branch.&lt;name&gt;.merge options will be used (see
+<div class="paragraph"><p>If <code>&lt;upstream&gt;</code> is not specified, the upstream configured in
+<code>branch.&lt;name&gt;.remote</code> and <code>branch.&lt;name&gt;.merge</code> options will be used (see
<a href="git-config.html">git-config(1)</a> for details) and the <code>--fork-point</code> option is
assumed. If you are currently not on any branch or if the current
branch does not have a configured upstream, the rebase will abort.</p></div>
<div class="paragraph"><p>All changes made by commits in the current branch but that are not
-in &lt;upstream&gt; are saved to a temporary area. This is the same set
+in <code>&lt;upstream&gt;</code> are saved to a temporary area. This is the same set
of commits that would be shown by <code>git log &lt;upstream&gt;..HEAD</code>; or by
<code>git log 'fork_point'..HEAD</code>, if <code>--fork-point</code> is active (see the
description on <code>--fork-point</code> below); or by <code>git log HEAD</code>, if the
<code>--root</code> option is specified.</p></div>
-<div class="paragraph"><p>The current branch is reset to &lt;upstream&gt;, or &lt;newbase&gt; if the
---onto option was supplied. This has the exact same effect as
-<code>git reset --hard &lt;upstream&gt;</code> (or &lt;newbase&gt;). ORIG_HEAD is set
+<div class="paragraph"><p>The current branch is reset to <code>&lt;upstream&gt;</code> or <code>&lt;newbase&gt;</code> if the
+<code>--onto</code> option was supplied. This has the exact same effect as
+<code>git reset --hard &lt;upstream&gt;</code> (or <code>&lt;newbase&gt;</code>). <code>ORIG_HEAD</code> is set
to point at the tip of the branch before the reset.</p></div>
<div class="paragraph"><p>The commits that were previously saved into the temporary area are
then reapplied to the current branch, one by one, in order. Note that
-any commits in HEAD which introduce the same textual changes as a commit
-in HEAD..&lt;upstream&gt; are omitted (i.e., a patch already accepted upstream
+any commits in <code>HEAD</code> which introduce the same textual changes as a commit
+in <code>HEAD..&lt;upstream&gt;</code> are omitted (i.e., a patch already accepted upstream
with a different commit message or timestamp will be skipped).</p></div>
<div class="paragraph"><p>It is possible that a merge failure will prevent this process from being
completely automatic. You will have to resolve any such merge failure
and run <code>git rebase --continue</code>. Another option is to bypass the commit
that caused the merge failure with <code>git rebase --skip</code>. To check out the
-original &lt;branch&gt; and remove the .git/rebase-apply working files, use the
-command <code>git rebase --abort</code> instead.</p></div>
+original <code>&lt;branch&gt;</code> and remove the <code>.git/rebase-apply</code> working files, use
+the command <code>git rebase --abort</code> instead.</p></div>
<div class="paragraph"><p>Assume the following history exists and the current branch is "topic":</p></div>
<div class="listingblock">
<div class="content">
@@ -815,7 +815,7 @@ followed by <code>git rebase master</code>. When rebase exits <code>topic</code>
remain the checked-out branch.</p></div>
<div class="paragraph"><p>If the upstream branch already contains a change you have made (e.g.,
because you mailed a patch which was applied upstream), then that commit
-will be skipped and warnings will be issued (if the <code>merge</code> backend is
+will be skipped and warnings will be issued (if the <em>merge</em> backend is
used). For example, running <code>git rebase master</code> on the following
history (in which <code>A'</code> and <code>A</code> introduce the same set of changes, but
have different committer information):</p></div>
@@ -904,10 +904,10 @@ the following situation:</p></div>
<pre><code> E---H'---I'---J' topicA</code></pre>
</div></div>
<div class="paragraph"><p>This is useful if F and G were flawed in some way, or should not be
-part of topicA. Note that the argument to --onto and the &lt;upstream&gt;
+part of topicA. Note that the argument to <code>--onto</code> and the <code>&lt;upstream&gt;</code>
parameter can be any valid commit-ish.</p></div>
-<div class="paragraph"><p>In case of conflict, <em>git rebase</em> will stop at the first problematic commit
-and leave conflict markers in the tree. You can use <em>git diff</em> to locate
+<div class="paragraph"><p>In case of conflict, <code>git rebase</code> will stop at the first problematic commit
+and leave conflict markers in the tree. You can use <code>git diff</code> to locate
the markers (&lt;&lt;&lt;&lt;&lt;&lt;) and make edits to resolve the conflict. For each
file you edit, you need to tell Git that the conflict has been resolved,
typically this would be done with</p></div>
@@ -938,8 +938,8 @@ desired resolution, you can continue the rebasing process with</p></div>
<dd>
<p>
Starting point at which to create the new commits. If the
- --onto option is not specified, the starting point is
- &lt;upstream&gt;. May be any valid commit, and not just an
+ <code>--onto</code> option is not specified, the starting point is
+ <code>&lt;upstream&gt;</code>. May be any valid commit, and not just an
existing branch name.
</p>
<div class="paragraph"><p>As a special case, you may use "A...B" as a shortcut for the
@@ -952,18 +952,18 @@ leave out at most one of A and B, in which case it defaults to HEAD.</p></div>
<dd>
<p>
Set the starting point at which to create the new commits to the
- merge base of &lt;upstream&gt; and &lt;branch&gt;. Running
- <em>git rebase --keep-base &lt;upstream&gt; &lt;branch&gt;</em> is equivalent to
+ merge base of <code>&lt;upstream&gt;</code> and <code>&lt;branch&gt;</code>. Running
+ <code>git rebase --keep-base &lt;upstream&gt; &lt;branch&gt;</code> is equivalent to
running
- <em>git rebase --onto &lt;upstream&gt;&#8230;&lt;branch&gt; &lt;upstream&gt; &lt;branch&gt;</em>.
+ <code>git rebase --onto &lt;upstream&gt;...&lt;branch&gt; &lt;upstream&gt; &lt;branch&gt;</code>.
</p>
<div class="paragraph"><p>This option is useful in the case where one is developing a feature on
top of an upstream branch. While the feature is being worked on, the
upstream branch may advance and it may not be the best idea to keep
rebasing on top of the upstream but to keep the base commit as-is.</p></div>
-<div class="paragraph"><p>Although both this option and --fork-point find the merge base between
-&lt;upstream&gt; and &lt;branch&gt;, this option uses the merge base as the <em>starting
-point</em> on which new commits will be created, whereas --fork-point uses
+<div class="paragraph"><p>Although both this option and <code>--fork-point</code> find the merge base between
+<code>&lt;upstream&gt;</code> and <code>&lt;branch&gt;</code>, this option uses the merge base as the <em>starting
+point</em> on which new commits will be created, whereas <code>--fork-point</code> uses
the merge base to determine the <em>set of commits</em> which will be rebased.</p></div>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
@@ -982,7 +982,7 @@ the merge base to determine the <em>set of commits</em> which will be rebased.</
</dt>
<dd>
<p>
- Working branch; defaults to HEAD.
+ Working branch; defaults to <code>HEAD</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -999,8 +999,8 @@ the merge base to determine the <em>set of commits</em> which will be rebased.</
<dd>
<p>
Abort the rebase operation and reset HEAD to the original
- branch. If &lt;branch&gt; was provided when the rebase operation was
- started, then HEAD will be reset to &lt;branch&gt;. Otherwise HEAD
+ branch. If <code>&lt;branch&gt;</code> was provided when the rebase operation was
+ started, then <code>HEAD</code> will be reset to <code>&lt;branch&gt;</code>. Otherwise <code>HEAD</code>
will be reset to where it was when the rebase operation was
started.
</p>
@@ -1010,10 +1010,10 @@ the merge base to determine the <em>set of commits</em> which will be rebased.</
</dt>
<dd>
<p>
- Abort the rebase operation but HEAD is not reset back to the
+ Abort the rebase operation but <code>HEAD</code> is not reset back to the
original branch. The index and working tree are also left
unchanged as a result. If a temporary stash entry was created
- using --autostash, it will be saved to the stash list.
+ using <code>--autostash</code>, it will be saved to the stash list.
</p>
</dd>
<dt class="hdlist1">
@@ -1037,16 +1037,16 @@ the merge base to determine the <em>set of commits</em> which will be rebased.</
empty after rebasing (because they contain a subset of already
upstream changes). With drop (the default), commits that
become empty are dropped. With keep, such commits are kept.
- With ask (implied by --interactive), the rebase will halt when
+ With ask (implied by <code>--interactive</code>), the rebase will halt when
an empty commit is applied allowing you to choose whether to
drop it, edit files more, or just commit the empty changes.
- Other options, like --exec, will use the default of drop unless
- -i/--interactive is explicitly specified.
+ Other options, like <code>--exec</code>, will use the default of drop unless
+ <code>-i</code>/<code>--interactive</code> is explicitly specified.
</p>
-<div class="paragraph"><p>Note that commits which start empty are kept (unless --no-keep-empty
+<div class="paragraph"><p>Note that commits which start empty are kept (unless <code>--no-keep-empty</code>
is specified), and commits which are clean cherry-picks (as determined
by <code>git log --cherry-mark ...</code>) are detected and dropped as a
-preliminary step (unless --reapply-cherry-picks is passed).</p></div>
+preliminary step (unless <code>--reapply-cherry-picks</code> is passed).</p></div>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
<dt class="hdlist1">
@@ -1060,7 +1060,7 @@ preliminary step (unless --reapply-cherry-picks is passed).</p></div>
Do not keep commits that start empty before the rebase
(i.e. that do not change anything from its parent) in the
result. The default is to keep commits which start empty,
- since creating such commits requires passing the --allow-empty
+ since creating such commits requires passing the <code>--allow-empty</code>
override flag to <code>git commit</code>, signifying that a user is very
intentionally creating such a commit and thus wants to keep
it.
@@ -1071,7 +1071,7 @@ removing the lines corresponding to the commits you don&#8217;t want. This
flag exists as a convenient shortcut, such as for cases where external
tools generate many empty commits and you want them all removed.</p></div>
<div class="paragraph"><p>For commits which do not start empty but become empty after rebasing,
-see the --empty flag.</p></div>
+see the <code>--empty</code> flag.</p></div>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
<dt class="hdlist1">
@@ -1091,7 +1091,7 @@ see the --empty flag.</p></div>
<div class="paragraph"><p>By default (or if <code>--no-reapply-cherry-picks</code> is given), these commits
will be automatically dropped. Because this necessitates reading all
upstream commits, this can be expensive in repos with a large number
-of upstream commits that need to be read. When using the <code>merge</code>
+of upstream commits that need to be read. When using the <em>merge</em>
backend, warnings will be issued for each dropped commit (unless
<code>--quiet</code> is given). Advice will also be issued unless
<code>advice.skippedCherryPicks</code> is set to false (see <a href="git-config.html">git-config(1)</a>).</p></div>
@@ -1148,10 +1148,10 @@ commits, potentially improving performance.</p></div>
Using merging strategies to rebase (default).
</p>
<div class="paragraph"><p>Note that a rebase merge works by replaying each commit from the working
-branch on top of the &lt;upstream&gt; branch. Because of this, when a merge
+branch on top of the <code>&lt;upstream&gt;</code> branch. Because of this, when a merge
conflict happens, the side reported as <em>ours</em> is the so-far rebased
-series, starting with &lt;upstream&gt;, and <em>theirs</em> is the working branch. In
-other words, the sides are swapped.</p></div>
+series, starting with <code>&lt;upstream&gt;</code>, and <em>theirs</em> is the working branch.
+In other words, the sides are swapped.</p></div>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
<dt class="hdlist1">
@@ -1165,9 +1165,9 @@ other words, the sides are swapped.</p></div>
Use the given merge strategy, instead of the default <code>ort</code>.
This implies <code>--merge</code>.
</p>
-<div class="paragraph"><p>Because <em>git rebase</em> replays each commit from the working branch
-on top of the &lt;upstream&gt; branch using the given strategy, using
-the <em>ours</em> strategy simply empties all patches from the &lt;branch&gt;,
+<div class="paragraph"><p>Because <code>git rebase</code> replays each commit from the working branch
+on top of the <code>&lt;upstream&gt;</code> branch using the given strategy, using
+the <code>ours</code> strategy simply empties all patches from the <code>&lt;branch&gt;</code>,
which makes little sense.</p></div>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
@@ -1224,7 +1224,7 @@ which makes little sense.</p></div>
</dt>
<dd>
<p>
- Be quiet. Implies --no-stat.
+ Be quiet. Implies <code>--no-stat</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1235,7 +1235,7 @@ which makes little sense.</p></div>
</dt>
<dd>
<p>
- Be verbose. Implies --stat.
+ Be verbose. Implies <code>--stat</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1272,7 +1272,7 @@ which makes little sense.</p></div>
<dd>
<p>
Allows the pre-rebase hook to run, which is the default. This option can
- be used to override --no-verify. See also <a href="githooks.html">githooks(5)</a>.
+ be used to override <code>--no-verify</code>. See also <a href="githooks.html">githooks(5)</a>.
</p>
</dd>
<dt class="hdlist1">
@@ -1280,10 +1280,10 @@ which makes little sense.</p></div>
</dt>
<dd>
<p>
- Ensure at least &lt;n&gt; lines of surrounding context match before
+ Ensure at least <code>&lt;n&gt;</code> lines of surrounding context match before
and after each change. When fewer lines of surrounding
context exist they all must match. By default no context is
- ever ignored. Implies --apply.
+ ever ignored. Implies <code>--apply</code>.
</p>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
@@ -1316,19 +1316,19 @@ details).</p></div>
</dt>
<dd>
<p>
- Use reflog to find a better common ancestor between &lt;upstream&gt;
- and &lt;branch&gt; when calculating which commits have been
- introduced by &lt;branch&gt;.
+ Use reflog to find a better common ancestor between <code>&lt;upstream&gt;</code>
+ and <code>&lt;branch&gt;</code> when calculating which commits have been
+ introduced by <code>&lt;branch&gt;</code>.
</p>
-<div class="paragraph"><p>When --fork-point is active, <em>fork_point</em> will be used instead of
-&lt;upstream&gt; to calculate the set of commits to rebase, where
+<div class="paragraph"><p>When <code>--fork-point</code> is active, <em>fork_point</em> will be used instead of
+<code>&lt;upstream&gt;</code> to calculate the set of commits to rebase, where
<em>fork_point</em> is the result of <code>git merge-base --fork-point &lt;upstream&gt;
&lt;branch&gt;</code> command (see <a href="git-merge-base.html">git-merge-base(1)</a>). If <em>fork_point</em>
-ends up being empty, the &lt;upstream&gt; will be used as a fallback.</p></div>
-<div class="paragraph"><p>If &lt;upstream&gt; is given on the command line, then the default is
+ends up being empty, the <code>&lt;upstream&gt;</code> will be used as a fallback.</p></div>
+<div class="paragraph"><p>If <code>&lt;upstream&gt;</code> is given on the command line, then the default is
<code>--no-fork-point</code>, otherwise the default is <code>--fork-point</code>. See also
<code>rebase.forkpoint</code> in <a href="git-config.html">git-config(1)</a>.</p></div>
-<div class="paragraph"><p>If your branch was based on &lt;upstream&gt; but &lt;upstream&gt; was rewound and
+<div class="paragraph"><p>If your branch was based on <code>&lt;upstream&gt;</code> but <code>&lt;upstream&gt;</code> was rewound and
your branch contains commits which were dropped, this option can be used
with <code>--keep-base</code> in order to drop those commits from your branch.</p></div>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
@@ -1339,27 +1339,43 @@ with <code>--keep-base</code> in order to drop those commits from your branch.</
<dd>
<p>
Ignore whitespace differences when trying to reconcile
-differences. Currently, each backend implements an approximation of
-this behavior:
+ differences. Currently, each backend implements an approximation of
+ this behavior:
</p>
-<div class="paragraph"><p>apply backend: When applying a patch, ignore changes in whitespace in
-context lines. Unfortunately, this means that if the "old" lines being
-replaced by the patch differ only in whitespace from the existing
-file, you will get a merge conflict instead of a successful patch
-application.</p></div>
-<div class="paragraph"><p>merge backend: Treat lines with only whitespace changes as unchanged
-when merging. Unfortunately, this means that any patch hunks that were
-intended to modify whitespace and nothing else will be dropped, even
-if the other side had no changes that conflicted.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+apply backend
+</dt>
+<dd>
+<p>
+ When applying a patch, ignore changes in whitespace in context
+ lines. Unfortunately, this means that if the "old" lines being
+ replaced by the patch differ only in whitespace from the existing
+ file, you will get a merge conflict instead of a successful patch
+ application.
+</p>
+</dd>
+<dt class="hdlist1">
+merge backend
+</dt>
+<dd>
+<p>
+ Treat lines with only whitespace changes as unchanged when merging.
+ Unfortunately, this means that any patch hunks that were intended
+ to modify whitespace and nothing else will be dropped, even if the
+ other side had no changes that conflicted.
+</p>
+</dd>
+</dl></div>
</dd>
<dt class="hdlist1">
--whitespace=&lt;option&gt;
</dt>
<dd>
<p>
- This flag is passed to the <em>git apply</em> program
+ This flag is passed to the <code>git apply</code> program
(see <a href="git-apply.html">git-apply(1)</a>) that applies the patch.
- Implies --apply.
+ Implies <code>--apply</code>.
</p>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
@@ -1451,7 +1467,7 @@ explicit <code>exec git merge -s &lt;strategy&gt; [...]</code> commands.</p></di
<dd>
<p>
Append "exec &lt;cmd&gt;" after each line creating a commit in the
- final history. &lt;cmd&gt; will be interpreted as one or more shell
+ final history. <code>&lt;cmd&gt;</code> will be interpreted as one or more shell
commands. Any command that fails will interrupt the rebase,
with exit code 1.
</p>
@@ -1466,7 +1482,7 @@ with several commands:</p></div>
<div class="content">
<pre><code>git rebase -i --exec "cmd1" --exec "cmd2" --exec ...</code></pre>
</div></div>
-<div class="paragraph"><p>If <code>--autosquash</code> is used, "exec" lines will not be appended for
+<div class="paragraph"><p>If <code>--autosquash</code> is used, <code>exec</code> lines will not be appended for
the intermediate commits, and will only appear at the end of each
squash/fixup series.</p></div>
<div class="paragraph"><p>This uses the <code>--interactive</code> machinery internally, but it can be run
@@ -1478,11 +1494,12 @@ without an explicit <code>--interactive</code>.</p></div>
</dt>
<dd>
<p>
- Rebase all commits reachable from &lt;branch&gt;, instead of
- limiting them with an &lt;upstream&gt;. This allows you to rebase
- the root commit(s) on a branch. When used with --onto, it
- will skip changes already contained in &lt;newbase&gt; (instead of
- &lt;upstream&gt;) whereas without --onto it will operate on every change.
+ Rebase all commits reachable from <code>&lt;branch&gt;</code>, instead of
+ limiting them with an <code>&lt;upstream&gt;</code>. This allows you to rebase
+ the root commit(s) on a branch. When used with <code>--onto</code>, it
+ will skip changes already contained in <code>&lt;newbase&gt;</code> (instead of
+ <code>&lt;upstream&gt;</code>) whereas without <code>--onto</code> it will operate on every
+ change.
</p>
<div class="paragraph"><p>See also INCOMPATIBLE OPTIONS below.</p></div>
</dd>
@@ -1660,44 +1677,44 @@ start would be overridden by the presence of
<div class="sect1">
<h2 id="_behavioral_differences">BEHAVIORAL DIFFERENCES</h2>
<div class="sectionbody">
-<div class="paragraph"><p>git rebase has two primary backends: apply and merge. (The apply
+<div class="paragraph"><p><code>git rebase</code> has two primary backends: <em>apply</em> and <em>merge</em>. (The <em>apply</em>
backend used to be known as the <em>am</em> backend, but the name led to
-confusion as it looks like a verb instead of a noun. Also, the merge
+confusion as it looks like a verb instead of a noun. Also, the <em>merge</em>
backend used to be known as the interactive backend, but it is now
used for non-interactive cases as well. Both were renamed based on
lower-level functionality that underpinned each.) There are some
subtle differences in how these two backends behave:</p></div>
<div class="sect2">
<h3 id="_empty_commits">Empty commits</h3>
-<div class="paragraph"><p>The apply backend unfortunately drops intentionally empty commits, i.e.
+<div class="paragraph"><p>The <em>apply</em> backend unfortunately drops intentionally empty commits, i.e.
commits that started empty, though these are rare in practice. It
also drops commits that become empty and has no option for controlling
this behavior.</p></div>
-<div class="paragraph"><p>The merge backend keeps intentionally empty commits by default (though
-with -i they are marked as empty in the todo list editor, or they can
-be dropped automatically with --no-keep-empty).</p></div>
+<div class="paragraph"><p>The <em>merge</em> backend keeps intentionally empty commits by default (though
+with <code>-i</code> they are marked as empty in the todo list editor, or they can
+be dropped automatically with <code>--no-keep-empty</code>).</p></div>
<div class="paragraph"><p>Similar to the apply backend, by default the merge backend drops
-commits that become empty unless -i/--interactive is specified (in
+commits that become empty unless <code>-i</code>/<code>--interactive</code> is specified (in
which case it stops and asks the user what to do). The merge backend
-also has an --empty={drop,keep,ask} option for changing the behavior
+also has an <code>--empty={drop,keep,ask}</code> option for changing the behavior
of handling commits that become empty.</p></div>
</div>
<div class="sect2">
<h3 id="_directory_rename_detection">Directory rename detection</h3>
<div class="paragraph"><p>Due to the lack of accurate tree information (arising from
constructing fake ancestors with the limited information available in
-patches), directory rename detection is disabled in the apply backend.
+patches), directory rename detection is disabled in the <em>apply</em> backend.
Disabled directory rename detection means that if one side of history
renames a directory and the other adds new files to the old directory,
then the new files will be left behind in the old directory without
any warning at the time of rebasing that you may want to move these
files into the new directory.</p></div>
-<div class="paragraph"><p>Directory rename detection works with the merge backend to provide you
+<div class="paragraph"><p>Directory rename detection works with the <em>merge</em> backend to provide you
warnings in such cases.</p></div>
</div>
<div class="sect2">
<h3 id="_context">Context</h3>
-<div class="paragraph"><p>The apply backend works by creating a sequence of patches (by calling
+<div class="paragraph"><p>The <em>apply</em> backend works by creating a sequence of patches (by calling
<code>format-patch</code> internally), and then applying the patches in sequence
(calling <code>am</code> internally). Patches are composed of multiple hunks,
each with line numbers, a context region, and the actual changes. The
@@ -1708,48 +1725,48 @@ order to apply the changes to the right lines. However, if multiple
areas of the code have the same surrounding lines of context, the
wrong one can be picked. There are real-world cases where this has
caused commits to be reapplied incorrectly with no conflicts reported.
-Setting diff.context to a larger value may prevent such types of
+Setting <code>diff.context</code> to a larger value may prevent such types of
problems, but increases the chance of spurious conflicts (since it
will require more lines of matching context to apply).</p></div>
-<div class="paragraph"><p>The merge backend works with a full copy of each relevant file,
+<div class="paragraph"><p>The <em>merge</em> backend works with a full copy of each relevant file,
insulating it from these types of problems.</p></div>
</div>
<div class="sect2">
<h3 id="_labelling_of_conflicts_markers">Labelling of conflicts markers</h3>
<div class="paragraph"><p>When there are content conflicts, the merge machinery tries to
annotate each side&#8217;s conflict markers with the commits where the
-content came from. Since the apply backend drops the original
+content came from. Since the <em>apply</em> backend drops the original
information about the rebased commits and their parents (and instead
generates new fake commits based off limited information in the
generated patches), those commits cannot be identified; instead it has
-to fall back to a commit summary. Also, when merge.conflictStyle is
-set to diff3 or zdiff3, the apply backend will use "constructed merge
+to fall back to a commit summary. Also, when <code>merge.conflictStyle</code> is
+set to <code>diff3</code> or <code>zdiff3</code>, the <em>apply</em> backend will use "constructed merge
base" to label the content from the merge base, and thus provide no
information about the merge base commit whatsoever.</p></div>
-<div class="paragraph"><p>The merge backend works with the full commits on both sides of history
+<div class="paragraph"><p>The <em>merge</em> backend works with the full commits on both sides of history
and thus has no such limitations.</p></div>
</div>
<div class="sect2">
<h3 id="_hooks">Hooks</h3>
-<div class="paragraph"><p>The apply backend has not traditionally called the post-commit hook,
-while the merge backend has. Both have called the post-checkout hook,
-though the merge backend has squelched its output. Further, both
+<div class="paragraph"><p>The <em>apply</em> backend has not traditionally called the post-commit hook,
+while the <em>merge</em> backend has. Both have called the post-checkout hook,
+though the <em>merge</em> backend has squelched its output. Further, both
backends only call the post-checkout hook with the starting point
commit of the rebase, not the intermediate commits nor the final
commit. In each case, the calling of these hooks was by accident of
implementation rather than by design (both backends were originally
implemented as shell scripts and happened to invoke other commands
-like <em>git checkout</em> or <em>git commit</em> that would call the hooks). Both
+like <code>git checkout</code> or <code>git commit</code> that would call the hooks). Both
backends should have the same behavior, though it is not entirely
clear which, if any, is correct. We will likely make rebase stop
calling either of these hooks in the future.</p></div>
</div>
<div class="sect2">
<h3 id="_interruptability">Interruptability</h3>
-<div class="paragraph"><p>The apply backend has safety problems with an ill-timed interrupt; if
+<div class="paragraph"><p>The <em>apply</em> backend has safety problems with an ill-timed interrupt; if
the user presses Ctrl-C at the wrong time to try to abort the rebase,
the rebase can enter a state where it cannot be aborted with a
-subsequent <code>git rebase --abort</code>. The merge backend does not appear to
+subsequent <code>git rebase --abort</code>. The <em>merge</em> backend does not appear to
suffer from the same shortcoming. (See
<a href="https://lore.kernel.org/git/20200207132152.GC2868@szeder.dev/">https://lore.kernel.org/git/20200207132152.GC2868@szeder.dev/</a> for
details.)</p></div>
@@ -1760,8 +1777,8 @@ details.)</p></div>
to resolve. Since the user may need to make notable changes while
resolving conflicts, after conflicts are resolved and the user has run
<code>git rebase --continue</code>, the rebase should open an editor and ask the
-user to update the commit message. The merge backend does this, while
-the apply backend blindly applies the original commit message.</p></div>
+user to update the commit message. The <em>merge</em> backend does this, while
+the <em>apply</em> backend blindly applies the original commit message.</p></div>
</div>
<div class="sect2">
<h3 id="_miscellaneous_differences">Miscellaneous differences</h3>
@@ -1788,7 +1805,7 @@ Progress, informational, and error messages: The two backends
<li>
<p>
State directories: The two backends keep their state in different
- directories under .git/
+ directories under <code>.git/</code>
</p>
</li>
</ul></div>
@@ -2059,14 +2076,14 @@ substitutes the changed version instead.</p></div>
<div class="sect1">
<h2 id="_notes">NOTES</h2>
<div class="sectionbody">
-<div class="paragraph"><p>You should understand the implications of using <em>git rebase</em> on a
+<div class="paragraph"><p>You should understand the implications of using <code>git rebase</code> on a
repository that you share. See also RECOVERING FROM UPSTREAM REBASE
below.</p></div>
-<div class="paragraph"><p>When the git-rebase command is run, it will first execute a "pre-rebase"
-hook if one exists. You can use this hook to do sanity checks and
-reject the rebase if it isn&#8217;t appropriate. Please see the template
-pre-rebase hook script for an example.</p></div>
-<div class="paragraph"><p>Upon completion, &lt;branch&gt; will be the current branch.</p></div>
+<div class="paragraph"><p>When the rebase is run, it will first execute a <code>pre-rebase</code> hook if one
+exists. You can use this hook to do sanity checks and reject the rebase
+if it isn&#8217;t appropriate. Please see the template <code>pre-rebase</code> hook script
+for an example.</p></div>
+<div class="paragraph"><p>Upon completion, <code>&lt;branch&gt;</code> will be the current branch.</p></div>
</div>
</div>
<div class="sect1">
@@ -2154,7 +2171,7 @@ pick fa1afe1 The oneline of the next commit
not look at them but at the commit names ("deadbee" and "fa1afe1" in this
example), so do not delete or edit the names.</p></div>
<div class="paragraph"><p>By replacing the command "pick" with the command "edit", you can tell
-<em>git rebase</em> to stop after applying that commit, so that you can edit
+<code>git rebase</code> to stop after applying that commit, so that you can edit
the files and/or the commit message, amend the commit, and continue
rebasing.</p></div>
<div class="paragraph"><p>To interrupt the rebase (just like an "edit" command would do, but without
@@ -2177,12 +2194,12 @@ incorporated into the folded commit. If there is more than one "fixup -c"
commit, the message from the final one is used. You can also use
"fixup -C" to get the same behavior as "fixup -c" except without opening
an editor.</p></div>
-<div class="paragraph"><p><em>git rebase</em> will stop when "pick" has been replaced with "edit" or
+<div class="paragraph"><p><code>git rebase</code> will stop when "pick" has been replaced with "edit" or
when a command fails due to merge errors. When you are done editing
and/or resolving conflicts you can continue with <code>git rebase --continue</code>.</p></div>
<div class="paragraph"><p>For example, if you want to reorder the last 5 commits, such that what
-was HEAD~4 becomes the new HEAD. To achieve that, you would call
-<em>git rebase</em> like this:</p></div>
+was <code>HEAD~4</code> becomes the new <code>HEAD</code>. To achieve that, you would call
+<code>git rebase</code> like this:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git rebase -i HEAD~5</code></pre>
@@ -2199,7 +2216,7 @@ like this:</p></div>
---o---O---P---Q</code></pre>
</div></div>
<div class="paragraph"><p>Suppose you want to rebase the side branch starting at "A" to "Q". Make
-sure that the current HEAD is "B", and call</p></div>
+sure that the current <code>HEAD</code> is "B", and call</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git rebase -i -r --onto Q O</code></pre>
@@ -2249,14 +2266,14 @@ exec make test</code></pre>
<h2 id="_splitting_commits">SPLITTING COMMITS</h2>
<div class="sectionbody">
<div class="paragraph"><p>In interactive mode, you can mark commits with the action "edit". However,
-this does not necessarily mean that <em>git rebase</em> expects the result of this
+this does not necessarily mean that <code>git rebase</code> expects the result of this
edit to be exactly one commit. Indeed, you can undo the commit, or you can
add other commits. This can be used to split a commit into two:</p></div>
<div class="ulist"><ul>
<li>
<p>
Start an interactive rebase with <code>git rebase -i &lt;commit&gt;^</code>, where
- &lt;commit&gt; is the commit you want to split. In fact, any commit range
+ <code>&lt;commit&gt;</code> is the commit you want to split. In fact, any commit range
will do, as long as it contains that commit.
</p>
</li>
@@ -2268,7 +2285,7 @@ Mark the commit you want to split with the action "edit".
<li>
<p>
When it comes to editing that commit, execute <code>git reset HEAD^</code>. The
- effect is that the HEAD is rewound by one, and the index follows suit.
+ effect is that the <code>HEAD</code> is rewound by one, and the index follows suit.
However, the working tree stays the same.
</p>
</li>
@@ -2276,7 +2293,7 @@ When it comes to editing that commit, execute <code>git reset HEAD^</code>. The
<p>
Now add the changes to the index that you want to have in the first
commit. You can use <code>git add</code> (possibly interactively) or
- <em>git gui</em> (or both) to do that.
+ <code>git gui</code> (or both) to do that.
</p>
</li>
<li>
@@ -2298,7 +2315,7 @@ Continue the rebase with <code>git rebase --continue</code>.
</ul></div>
<div class="paragraph"><p>If you are not absolutely sure that the intermediate revisions are
consistent (they compile, pass the testsuite, etc.) you should use
-<em>git stash</em> to stash away the not-yet-committed changes
+<code>git stash</code> to stash away the not-yet-committed changes
after each commit, test, and amend the commit if fixes are necessary.</p></div>
</div>
</div>
@@ -2408,14 +2425,14 @@ correspond to the ones before the rebase.</p></div>
--interactive</code> will be <strong>resurrected</strong>!</td>
</tr></table>
</div>
-<div class="paragraph"><p>The idea is to manually tell <em>git rebase</em> "where the old <em>subsystem</em>
+<div class="paragraph"><p>The idea is to manually tell <code>git rebase</code> "where the old <em>subsystem</em>
ended and your <em>topic</em> began", that is, what the old merge base
between them was. You will have to find a way to name the last commit
of the old <em>subsystem</em>, for example:</p></div>
<div class="ulist"><ul>
<li>
<p>
-With the <em>subsystem</em> reflog: after <em>git fetch</em>, the old tip of
+With the <em>subsystem</em> reflog: after <code>git fetch</code>, the old tip of
<em>subsystem</em> is at <code>subsystem@{1}</code>. Subsequent fetches will
increase the number. (See <a href="git-reflog.html">git-reflog(1)</a>.)
</p>
@@ -2704,7 +2721,7 @@ sequence.editor
<div id="footer">
<div id="footer-text">
Last updated
- 2022-05-11 15:14:01 PDT
+ 2022-07-18 13:37:02 PDT
</div>
</div>
</body>
diff --git a/git-rebase.txt b/git-rebase.txt
index 262fb01ae..a872ab0fb 100644
--- a/git-rebase.txt
+++ b/git-rebase.txt
@@ -16,40 +16,40 @@ SYNOPSIS
DESCRIPTION
-----------
-If <branch> is specified, 'git rebase' will perform an automatic
+If `<branch>` is specified, `git rebase` will perform an automatic
`git switch <branch>` before doing anything else. Otherwise
it remains on the current branch.
-If <upstream> is not specified, the upstream configured in
-branch.<name>.remote and branch.<name>.merge options will be used (see
+If `<upstream>` is not specified, the upstream configured in
+`branch.<name>.remote` and `branch.<name>.merge` options will be used (see
linkgit:git-config[1] for details) and the `--fork-point` option is
assumed. If you are currently not on any branch or if the current
branch does not have a configured upstream, the rebase will abort.
All changes made by commits in the current branch but that are not
-in <upstream> are saved to a temporary area. This is the same set
+in `<upstream>` are saved to a temporary area. This is the same set
of commits that would be shown by `git log <upstream>..HEAD`; or by
`git log 'fork_point'..HEAD`, if `--fork-point` is active (see the
description on `--fork-point` below); or by `git log HEAD`, if the
`--root` option is specified.
-The current branch is reset to <upstream>, or <newbase> if the
---onto option was supplied. This has the exact same effect as
-`git reset --hard <upstream>` (or <newbase>). ORIG_HEAD is set
+The current branch is reset to `<upstream>` or `<newbase>` if the
+`--onto` option was supplied. This has the exact same effect as
+`git reset --hard <upstream>` (or `<newbase>`). `ORIG_HEAD` is set
to point at the tip of the branch before the reset.
The commits that were previously saved into the temporary area are
then reapplied to the current branch, one by one, in order. Note that
-any commits in HEAD which introduce the same textual changes as a commit
-in HEAD..<upstream> are omitted (i.e., a patch already accepted upstream
+any commits in `HEAD` which introduce the same textual changes as a commit
+in `HEAD..<upstream>` are omitted (i.e., a patch already accepted upstream
with a different commit message or timestamp will be skipped).
It is possible that a merge failure will prevent this process from being
completely automatic. You will have to resolve any such merge failure
and run `git rebase --continue`. Another option is to bypass the commit
that caused the merge failure with `git rebase --skip`. To check out the
-original <branch> and remove the .git/rebase-apply working files, use the
-command `git rebase --abort` instead.
+original `<branch>` and remove the `.git/rebase-apply` working files, use
+the command `git rebase --abort` instead.
Assume the following history exists and the current branch is "topic":
@@ -79,7 +79,7 @@ remain the checked-out branch.
If the upstream branch already contains a change you have made (e.g.,
because you mailed a patch which was applied upstream), then that commit
-will be skipped and warnings will be issued (if the `merge` backend is
+will be skipped and warnings will be issued (if the 'merge' backend is
used). For example, running `git rebase master` on the following
history (in which `A'` and `A` introduce the same set of changes, but
have different committer information):
@@ -176,11 +176,11 @@ would result in the removal of commits F and G:
------------
This is useful if F and G were flawed in some way, or should not be
-part of topicA. Note that the argument to --onto and the <upstream>
+part of topicA. Note that the argument to `--onto` and the `<upstream>`
parameter can be any valid commit-ish.
-In case of conflict, 'git rebase' will stop at the first problematic commit
-and leave conflict markers in the tree. You can use 'git diff' to locate
+In case of conflict, `git rebase` will stop at the first problematic commit
+and leave conflict markers in the tree. You can use `git diff` to locate
the markers (<<<<<<) and make edits to resolve the conflict. For each
file you edit, you need to tell Git that the conflict has been resolved,
typically this would be done with
@@ -205,8 +205,8 @@ OPTIONS
-------
--onto <newbase>::
Starting point at which to create the new commits. If the
- --onto option is not specified, the starting point is
- <upstream>. May be any valid commit, and not just an
+ `--onto` option is not specified, the starting point is
+ `<upstream>`. May be any valid commit, and not just an
existing branch name.
+
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.
--keep-base::
Set the starting point at which to create the new commits to the
- merge base of <upstream> and <branch>. Running
- 'git rebase --keep-base <upstream> <branch>' is equivalent to
+ merge base of `<upstream>` and `<branch>`. Running
+ `git rebase --keep-base <upstream> <branch>` is equivalent to
running
- 'git rebase --onto <upstream>...<branch> <upstream> <branch>'.
+ `git rebase --onto <upstream>...<branch> <upstream> <branch>`.
+
This option is useful in the case where one is developing a feature on
top of an upstream branch. While the feature is being worked on, the
upstream branch may advance and it may not be the best idea to keep
rebasing on top of the upstream but to keep the base commit as-is.
+
-Although both this option and --fork-point find the merge base between
-<upstream> and <branch>, this option uses the merge base as the _starting
-point_ on which new commits will be created, whereas --fork-point uses
+Although both this option and `--fork-point` find the merge base between
+`<upstream>` and `<branch>`, this option uses the merge base as the _starting
+point_ on which new commits will be created, whereas `--fork-point` uses
the merge base to determine the _set of commits_ which will be rebased.
+
See also INCOMPATIBLE OPTIONS below.
@@ -238,23 +238,23 @@ See also INCOMPATIBLE OPTIONS below.
upstream for the current branch.
<branch>::
- Working branch; defaults to HEAD.
+ Working branch; defaults to `HEAD`.
--continue::
Restart the rebasing process after having resolved a merge conflict.
--abort::
Abort the rebase operation and reset HEAD to the original
- branch. If <branch> was provided when the rebase operation was
- started, then HEAD will be reset to <branch>. Otherwise HEAD
+ branch. If `<branch>` was provided when the rebase operation was
+ started, then `HEAD` will be reset to `<branch>`. Otherwise `HEAD`
will be reset to where it was when the rebase operation was
started.
--quit::
- Abort the rebase operation but HEAD is not reset back to the
+ Abort the rebase operation but `HEAD` is not reset back to the
original branch. The index and working tree are also left
unchanged as a result. If a temporary stash entry was created
- using --autostash, it will be saved to the stash list.
+ using `--autostash`, it will be saved to the stash list.
--apply::
Use applying strategies to rebase (calling `git-am`
@@ -269,16 +269,16 @@ See also INCOMPATIBLE OPTIONS below.
empty after rebasing (because they contain a subset of already
upstream changes). With drop (the default), commits that
become empty are dropped. With keep, such commits are kept.
- With ask (implied by --interactive), the rebase will halt when
+ With ask (implied by `--interactive`), the rebase will halt when
an empty commit is applied allowing you to choose whether to
drop it, edit files more, or just commit the empty changes.
- Other options, like --exec, will use the default of drop unless
- -i/--interactive is explicitly specified.
+ Other options, like `--exec`, will use the default of drop unless
+ `-i`/`--interactive` is explicitly specified.
+
-Note that commits which start empty are kept (unless --no-keep-empty
+Note that commits which start empty are kept (unless `--no-keep-empty`
is specified), and commits which are clean cherry-picks (as determined
by `git log --cherry-mark ...`) are detected and dropped as a
-preliminary step (unless --reapply-cherry-picks is passed).
+preliminary step (unless `--reapply-cherry-picks` is passed).
+
See also INCOMPATIBLE OPTIONS below.
@@ -287,7 +287,7 @@ See also INCOMPATIBLE OPTIONS below.
Do not keep commits that start empty before the rebase
(i.e. that do not change anything from its parent) in the
result. The default is to keep commits which start empty,
- since creating such commits requires passing the --allow-empty
+ since creating such commits requires passing the `--allow-empty`
override flag to `git commit`, signifying that a user is very
intentionally creating such a commit and thus wants to keep
it.
@@ -299,7 +299,7 @@ flag exists as a convenient shortcut, such as for cases where external
tools generate many empty commits and you want them all removed.
+
For commits which do not start empty but become empty after rebasing,
-see the --empty flag.
+see the `--empty` flag.
+
See also INCOMPATIBLE OPTIONS below.
@@ -314,7 +314,7 @@ See also INCOMPATIBLE OPTIONS below.
By default (or if `--no-reapply-cherry-picks` is given), these commits
will be automatically dropped. Because this necessitates reading all
upstream commits, this can be expensive in repos with a large number
-of upstream commits that need to be read. When using the `merge`
+of upstream commits that need to be read. When using the 'merge'
backend, warnings will be issued for each dropped commit (unless
`--quiet` is given). Advice will also be issued unless
`advice.skippedCherryPicks` is set to false (see linkgit:git-config[1]).
@@ -348,10 +348,10 @@ See also INCOMPATIBLE OPTIONS below.
Using merging strategies to rebase (default).
+
Note that a rebase merge works by replaying each commit from the working
-branch on top of the <upstream> branch. Because of this, when a merge
+branch on top of the `<upstream>` branch. Because of this, when a merge
conflict happens, the side reported as 'ours' is the so-far rebased
-series, starting with <upstream>, and 'theirs' is the working branch. In
-other words, the sides are swapped.
+series, starting with `<upstream>`, and 'theirs' is the working branch.
+In other words, the sides are swapped.
+
See also INCOMPATIBLE OPTIONS below.
@@ -360,9 +360,9 @@ See also INCOMPATIBLE OPTIONS below.
Use the given merge strategy, instead of the default `ort`.
This implies `--merge`.
+
-Because 'git rebase' replays each commit from the working branch
-on top of the <upstream> branch using the given strategy, using
-the 'ours' strategy simply empties all patches from the <branch>,
+Because `git rebase` replays each commit from the working branch
+on top of the `<upstream>` branch using the given strategy, using
+the `ours` strategy simply empties all patches from the `<branch>`,
which makes little sense.
+
See also INCOMPATIBLE OPTIONS below.
@@ -392,11 +392,11 @@ See also INCOMPATIBLE OPTIONS below.
-q::
--quiet::
- Be quiet. Implies --no-stat.
+ Be quiet. Implies `--no-stat`.
-v::
--verbose::
- Be verbose. Implies --stat.
+ Be verbose. Implies `--stat`.
--stat::
Show a diffstat of what changed upstream since the last rebase. The
@@ -411,13 +411,13 @@ See also INCOMPATIBLE OPTIONS below.
--verify::
Allows the pre-rebase hook to run, which is the default. This option can
- be used to override --no-verify. See also linkgit:githooks[5].
+ be used to override `--no-verify`. See also linkgit:githooks[5].
-C<n>::
- Ensure at least <n> lines of surrounding context match before
+ Ensure at least `<n>` lines of surrounding context match before
and after each change. When fewer lines of surrounding
context exist they all must match. By default no context is
- ever ignored. Implies --apply.
+ ever ignored. Implies `--apply`.
+
See also INCOMPATIBLE OPTIONS below.
@@ -436,21 +436,21 @@ details).
--fork-point::
--no-fork-point::
- Use reflog to find a better common ancestor between <upstream>
- and <branch> when calculating which commits have been
- introduced by <branch>.
+ Use reflog to find a better common ancestor between `<upstream>`
+ and `<branch>` when calculating which commits have been
+ introduced by `<branch>`.
+
-When --fork-point is active, 'fork_point' will be used instead of
-<upstream> to calculate the set of commits to rebase, where
+When `--fork-point` is active, 'fork_point' will be used instead of
+`<upstream>` to calculate the set of commits to rebase, where
'fork_point' is the result of `git merge-base --fork-point <upstream>
<branch>` command (see linkgit:git-merge-base[1]). If 'fork_point'
-ends up being empty, the <upstream> will be used as a fallback.
+ends up being empty, the `<upstream>` will be used as a fallback.
+
-If <upstream> is given on the command line, then the default is
+If `<upstream>` is given on the command line, then the default is
`--no-fork-point`, otherwise the default is `--fork-point`. See also
`rebase.forkpoint` in linkgit:git-config[1].
+
-If your branch was based on <upstream> but <upstream> was rewound and
+If your branch was based on `<upstream>` but `<upstream>` was rewound and
your branch contains commits which were dropped, this option can be used
with `--keep-base` in order to drop those commits from your branch.
+
@@ -458,24 +458,26 @@ See also INCOMPATIBLE OPTIONS below.
--ignore-whitespace::
Ignore whitespace differences when trying to reconcile
-differences. Currently, each backend implements an approximation of
-this behavior:
+ differences. Currently, each backend implements an approximation of
+ this behavior:
+
-apply backend: When applying a patch, ignore changes in whitespace in
-context lines. Unfortunately, this means that if the "old" lines being
-replaced by the patch differ only in whitespace from the existing
-file, you will get a merge conflict instead of a successful patch
-application.
+apply backend;;
+ When applying a patch, ignore changes in whitespace in context
+ lines. Unfortunately, this means that if the "old" lines being
+ replaced by the patch differ only in whitespace from the existing
+ file, you will get a merge conflict instead of a successful patch
+ application.
+
-merge backend: Treat lines with only whitespace changes as unchanged
-when merging. Unfortunately, this means that any patch hunks that were
-intended to modify whitespace and nothing else will be dropped, even
-if the other side had no changes that conflicted.
+merge backend;;
+ Treat lines with only whitespace changes as unchanged when merging.
+ Unfortunately, this means that any patch hunks that were intended
+ to modify whitespace and nothing else will be dropped, even if the
+ other side had no changes that conflicted.
--whitespace=<option>::
- This flag is passed to the 'git apply' program
+ This flag is passed to the `git apply` program
(see linkgit:git-apply[1]) that applies the patch.
- Implies --apply.
+ Implies `--apply`.
+
See also INCOMPATIBLE OPTIONS below.
@@ -537,7 +539,7 @@ See also REBASING MERGES and INCOMPATIBLE OPTIONS below.
-x <cmd>::
--exec <cmd>::
Append "exec <cmd>" after each line creating a commit in the
- final history. <cmd> will be interpreted as one or more shell
+ final history. `<cmd>` will be interpreted as one or more shell
commands. Any command that fails will interrupt the rebase,
with exit code 1.
+
@@ -550,7 +552,7 @@ or by giving more than one `--exec`:
+
git rebase -i --exec "cmd1" --exec "cmd2" --exec ...
+
-If `--autosquash` is used, "exec" lines will not be appended for
+If `--autosquash` is used, `exec` lines will not be appended for
the intermediate commits, and will only appear at the end of each
squash/fixup series.
+
@@ -560,11 +562,12 @@ without an explicit `--interactive`.
See also INCOMPATIBLE OPTIONS below.
--root::
- Rebase all commits reachable from <branch>, instead of
- limiting them with an <upstream>. This allows you to rebase
- the root commit(s) on a branch. When used with --onto, it
- will skip changes already contained in <newbase> (instead of
- <upstream>) whereas without --onto it will operate on every change.
+ Rebase all commits reachable from `<branch>`, instead of
+ limiting them with an `<upstream>`. This allows you to rebase
+ the root commit(s) on a branch. When used with `--onto`, it
+ will skip changes already contained in `<newbase>` (instead of
+ `<upstream>`) whereas without `--onto` it will operate on every
+ change.
+
See also INCOMPATIBLE OPTIONS below.
@@ -643,9 +646,9 @@ In addition, the following pairs of options are incompatible:
BEHAVIORAL DIFFERENCES
-----------------------
-git rebase has two primary backends: apply and merge. (The apply
+`git rebase` has two primary backends: 'apply' and 'merge'. (The 'apply'
backend used to be known as the 'am' backend, but the name led to
-confusion as it looks like a verb instead of a noun. Also, the merge
+confusion as it looks like a verb instead of a noun. Also, the 'merge'
backend used to be known as the interactive backend, but it is now
used for non-interactive cases as well. Both were renamed based on
lower-level functionality that underpinned each.) There are some
@@ -654,19 +657,19 @@ subtle differences in how these two backends behave:
Empty commits
~~~~~~~~~~~~~
-The apply backend unfortunately drops intentionally empty commits, i.e.
+The 'apply' backend unfortunately drops intentionally empty commits, i.e.
commits that started empty, though these are rare in practice. It
also drops commits that become empty and has no option for controlling
this behavior.
-The merge backend keeps intentionally empty commits by default (though
-with -i they are marked as empty in the todo list editor, or they can
-be dropped automatically with --no-keep-empty).
+The 'merge' backend keeps intentionally empty commits by default (though
+with `-i` they are marked as empty in the todo list editor, or they can
+be dropped automatically with `--no-keep-empty`).
Similar to the apply backend, by default the merge backend drops
-commits that become empty unless -i/--interactive is specified (in
+commits that become empty unless `-i`/`--interactive` is specified (in
which case it stops and asks the user what to do). The merge backend
-also has an --empty={drop,keep,ask} option for changing the behavior
+also has an `--empty={drop,keep,ask}` option for changing the behavior
of handling commits that become empty.
Directory rename detection
@@ -674,20 +677,20 @@ Directory rename detection
Due to the lack of accurate tree information (arising from
constructing fake ancestors with the limited information available in
-patches), directory rename detection is disabled in the apply backend.
+patches), directory rename detection is disabled in the 'apply' backend.
Disabled directory rename detection means that if one side of history
renames a directory and the other adds new files to the old directory,
then the new files will be left behind in the old directory without
any warning at the time of rebasing that you may want to move these
files into the new directory.
-Directory rename detection works with the merge backend to provide you
+Directory rename detection works with the 'merge' backend to provide you
warnings in such cases.
Context
~~~~~~~
-The apply backend works by creating a sequence of patches (by calling
+The 'apply' backend works by creating a sequence of patches (by calling
`format-patch` internally), and then applying the patches in sequence
(calling `am` internally). Patches are composed of multiple hunks,
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
areas of the code have the same surrounding lines of context, the
wrong one can be picked. There are real-world cases where this has
caused commits to be reapplied incorrectly with no conflicts reported.
-Setting diff.context to a larger value may prevent such types of
+Setting `diff.context` to a larger value may prevent such types of
problems, but increases the chance of spurious conflicts (since it
will require more lines of matching context to apply).
-The merge backend works with a full copy of each relevant file,
+The 'merge' backend works with a full copy of each relevant file,
insulating it from these types of problems.
Labelling of conflicts markers
@@ -710,30 +713,30 @@ Labelling of conflicts markers
When there are content conflicts, the merge machinery tries to
annotate each side's conflict markers with the commits where the
-content came from. Since the apply backend drops the original
+content came from. Since the 'apply' backend drops the original
information about the rebased commits and their parents (and instead
generates new fake commits based off limited information in the
generated patches), those commits cannot be identified; instead it has
-to fall back to a commit summary. Also, when merge.conflictStyle is
-set to diff3 or zdiff3, the apply backend will use "constructed merge
+to fall back to a commit summary. Also, when `merge.conflictStyle` is
+set to `diff3` or `zdiff3`, the 'apply' backend will use "constructed merge
base" to label the content from the merge base, and thus provide no
information about the merge base commit whatsoever.
-The merge backend works with the full commits on both sides of history
+The 'merge' backend works with the full commits on both sides of history
and thus has no such limitations.
Hooks
~~~~~
-The apply backend has not traditionally called the post-commit hook,
-while the merge backend has. Both have called the post-checkout hook,
-though the merge backend has squelched its output. Further, both
+The 'apply' backend has not traditionally called the post-commit hook,
+while the 'merge' backend has. Both have called the post-checkout hook,
+though the 'merge' backend has squelched its output. Further, both
backends only call the post-checkout hook with the starting point
commit of the rebase, not the intermediate commits nor the final
commit. In each case, the calling of these hooks was by accident of
implementation rather than by design (both backends were originally
implemented as shell scripts and happened to invoke other commands
-like 'git checkout' or 'git commit' that would call the hooks). Both
+like `git checkout` or `git commit` that would call the hooks). Both
backends should have the same behavior, though it is not entirely
clear which, if any, is correct. We will likely make rebase stop
calling either of these hooks in the future.
@@ -741,10 +744,10 @@ calling either of these hooks in the future.
Interruptability
~~~~~~~~~~~~~~~~
-The apply backend has safety problems with an ill-timed interrupt; if
+The 'apply' backend has safety problems with an ill-timed interrupt; if
the user presses Ctrl-C at the wrong time to try to abort the rebase,
the rebase can enter a state where it cannot be aborted with a
-subsequent `git rebase --abort`. The merge backend does not appear to
+subsequent `git rebase --abort`. The 'merge' backend does not appear to
suffer from the same shortcoming. (See
https://lore.kernel.org/git/20200207132152.GC2868@szeder.dev/ for
details.)
@@ -756,8 +759,8 @@ When a conflict occurs while rebasing, rebase stops and asks the user
to resolve. Since the user may need to make notable changes while
resolving conflicts, after conflicts are resolved and the user has run
`git rebase --continue`, the rebase should open an editor and ask the
-user to update the commit message. The merge backend does this, while
-the apply backend blindly applies the original commit message.
+user to update the commit message. The 'merge' backend does this, while
+the 'apply' backend blindly applies the original commit message.
Miscellaneous differences
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -777,23 +780,23 @@ completeness:
them to stderr.
* State directories: The two backends keep their state in different
- directories under .git/
+ directories under `.git/`
include::merge-strategies.txt[]
NOTES
-----
-You should understand the implications of using 'git rebase' on a
+You should understand the implications of using `git rebase` on a
repository that you share. See also RECOVERING FROM UPSTREAM REBASE
below.
-When the git-rebase command is run, it will first execute a "pre-rebase"
-hook if one exists. You can use this hook to do sanity checks and
-reject the rebase if it isn't appropriate. Please see the template
-pre-rebase hook script for an example.
+When the rebase is run, it will first execute a `pre-rebase` hook if one
+exists. You can use this hook to do sanity checks and reject the rebase
+if it isn't appropriate. Please see the template `pre-rebase` hook script
+for an example.
-Upon completion, <branch> will be the current branch.
+Upon completion, `<branch>` will be the current branch.
INTERACTIVE MODE
----------------
@@ -848,7 +851,7 @@ not look at them but at the commit names ("deadbee" and "fa1afe1" in this
example), so do not delete or edit the names.
By replacing the command "pick" with the command "edit", you can tell
-'git rebase' to stop after applying that commit, so that you can edit
+`git rebase` to stop after applying that commit, so that you can edit
the files and/or the commit message, amend the commit, and continue
rebasing.
@@ -876,14 +879,13 @@ commit, the message from the final one is used. You can also use
"fixup -C" to get the same behavior as "fixup -c" except without opening
an editor.
-
-'git rebase' will stop when "pick" has been replaced with "edit" or
+`git rebase` will stop when "pick" has been replaced with "edit" or
when a command fails due to merge errors. When you are done editing
and/or resolving conflicts you can continue with `git rebase --continue`.
For example, if you want to reorder the last 5 commits, such that what
-was HEAD~4 becomes the new HEAD. To achieve that, you would call
-'git rebase' like this:
+was `HEAD~4` becomes the new `HEAD`. To achieve that, you would call
+`git rebase` like this:
----------------------
$ git rebase -i HEAD~5
@@ -903,7 +905,7 @@ like this:
------------------
Suppose you want to rebase the side branch starting at "A" to "Q". Make
-sure that the current HEAD is "B", and call
+sure that the current `HEAD` is "B", and call
-----------------------------
$ git rebase -i -r --onto Q O
@@ -956,23 +958,23 @@ SPLITTING COMMITS
-----------------
In interactive mode, you can mark commits with the action "edit". However,
-this does not necessarily mean that 'git rebase' expects the result of this
+this does not necessarily mean that `git rebase` expects the result of this
edit to be exactly one commit. Indeed, you can undo the commit, or you can
add other commits. This can be used to split a commit into two:
- Start an interactive rebase with `git rebase -i <commit>^`, where
- <commit> is the commit you want to split. In fact, any commit range
+ `<commit>` is the commit you want to split. In fact, any commit range
will do, as long as it contains that commit.
- Mark the commit you want to split with the action "edit".
- When it comes to editing that commit, execute `git reset HEAD^`. The
- effect is that the HEAD is rewound by one, and the index follows suit.
+ effect is that the `HEAD` is rewound by one, and the index follows suit.
However, the working tree stays the same.
- Now add the changes to the index that you want to have in the first
commit. You can use `git add` (possibly interactively) or
- 'git gui' (or both) to do that.
+ `git gui` (or both) to do that.
- Commit the now-current index with whatever commit message is appropriate
now.
@@ -983,7 +985,7 @@ add other commits. This can be used to split a commit into two:
If you are not absolutely sure that the intermediate revisions are
consistent (they compile, pass the testsuite, etc.) you should use
-'git stash' to stash away the not-yet-committed changes
+`git stash` to stash away the not-yet-committed changes
after each commit, test, and amend the commit if fixes are necessary.
@@ -1087,12 +1089,12 @@ NOTE: While an "easy case recovery" sometimes appears to be successful
example, a commit that was removed via `git rebase
--interactive` will be **resurrected**!
-The idea is to manually tell 'git rebase' "where the old 'subsystem'
+The idea is to manually tell `git rebase` "where the old 'subsystem'
ended and your 'topic' began", that is, what the old merge base
between them was. You will have to find a way to name the last commit
of the old 'subsystem', for example:
-* With the 'subsystem' reflog: after 'git fetch', the old tip of
+* With the 'subsystem' reflog: after `git fetch`, the old tip of
'subsystem' is at `subsystem@{1}`. Subsequent fetches will
increase the number. (See linkgit:git-reflog[1].)
diff --git a/git-rev-parse.html b/git-rev-parse.html
index 3a0b9ee85..0f9100641 100644
--- a/git-rev-parse.html
+++ b/git-rev-parse.html
@@ -1464,12 +1464,9 @@ some output processing may assume ref names in UTF-8.</p></div>
</dt>
<dd>
<p>
- The suffix <em>@{upstream}</em> to a branchname (short form <em>&lt;branchname&gt;@{u}</em>)
- refers to the branch that the branch specified by branchname is set to build on
- top of (configured with <code>branch.&lt;name&gt;.remote</code> and
- <code>branch.&lt;name&gt;.merge</code>). A missing branchname defaults to the
- current one. These suffixes are also accepted when spelled in uppercase, and
- they mean the same thing no matter the case.
+ A branch B may be set up to build on top of a branch X (configured with
+ <code>branch.&lt;name&gt;.merge</code>) at a remote R (configured with
+ the branch X taken from remote R, typically found at <code>refs/remotes/R/X</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1479,9 +1476,8 @@ some output processing may assume ref names in UTF-8.</p></div>
<p>
The suffix <em>@{push}</em> reports the branch "where we would push to" if
<code>git push</code> were run while <code>branchname</code> was checked out (or the current
- <code>HEAD</code> if no branchname is specified). Since our push destination is
- in a remote repository, of course, we report the local tracking branch
- that corresponds to that branch (i.e., something in <code>refs/remotes/</code>).
+ <code>HEAD</code> if no branchname is specified). Like for <em>@{upstream}</em>, we report
+ the remote-tracking branch that corresponds to that branch at the remote.
</p>
<div class="paragraph"><p>Here&#8217;s an example to make it more clear:</p></div>
<div class="listingblock">
diff --git a/git.html b/git.html
index 2dbd0ee8b..009758199 100644
--- a/git.html
+++ b/git.html
@@ -1606,7 +1606,7 @@ ancillary user utilities.</p></div>
</dt>
<dd>
<p>
- Show three-way merge without touching index.
+ Perform merge without touching index or working tree.
</p>
</dd>
<dt class="hdlist1">
diff --git a/gitrevisions.html b/gitrevisions.html
index fcbfa3430..92311d977 100644
--- a/gitrevisions.html
+++ b/gitrevisions.html
@@ -931,12 +931,9 @@ some output processing may assume ref names in UTF-8.</p></div>
</dt>
<dd>
<p>
- The suffix <em>@{upstream}</em> to a branchname (short form <em>&lt;branchname&gt;@{u}</em>)
- refers to the branch that the branch specified by branchname is set to build on
- top of (configured with <code>branch.&lt;name&gt;.remote</code> and
- <code>branch.&lt;name&gt;.merge</code>). A missing branchname defaults to the
- current one. These suffixes are also accepted when spelled in uppercase, and
- they mean the same thing no matter the case.
+ A branch B may be set up to build on top of a branch X (configured with
+ <code>branch.&lt;name&gt;.merge</code>) at a remote R (configured with
+ the branch X taken from remote R, typically found at <code>refs/remotes/R/X</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -946,9 +943,8 @@ some output processing may assume ref names in UTF-8.</p></div>
<p>
The suffix <em>@{push}</em> reports the branch "where we would push to" if
<code>git push</code> were run while <code>branchname</code> was checked out (or the current
- <code>HEAD</code> if no branchname is specified). Since our push destination is
- in a remote repository, of course, we report the local tracking branch
- that corresponds to that branch (i.e., something in <code>refs/remotes/</code>).
+ <code>HEAD</code> if no branchname is specified). Like for <em>@{upstream}</em>, we report
+ the remote-tracking branch that corresponds to that branch at the remote.
</p>
<div class="paragraph"><p>Here&#8217;s an example to make it more clear:</p></div>
<div class="listingblock">
diff --git a/howto/coordinate-embargoed-releases.html b/howto/coordinate-embargoed-releases.html
index 9b7c68b49..debd997ac 100644
--- a/howto/coordinate-embargoed-releases.html
+++ b/howto/coordinate-embargoed-releases.html
@@ -873,7 +873,7 @@ Thanks,
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:16 PDT
+ 2022-07-18 13:38:02 PDT
</div>
</div>
</body>
diff --git a/howto/keep-canonical-history-correct.html b/howto/keep-canonical-history-correct.html
index d014e4a1a..2e4063965 100644
--- a/howto/keep-canonical-history-correct.html
+++ b/howto/keep-canonical-history-correct.html
@@ -938,7 +938,7 @@ tip of your <em>master</em> again and redo the two merges:</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:16 PDT
+ 2022-07-18 13:38:02 PDT
</div>
</div>
</body>
diff --git a/howto/maintain-git.html b/howto/maintain-git.html
index 8adebbda5..77b79f022 100644
--- a/howto/maintain-git.html
+++ b/howto/maintain-git.html
@@ -1469,7 +1469,7 @@ $ git update-ref -d $mf/ai/topic</code></pre>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:16 PDT
+ 2022-07-18 13:38:02 PDT
</div>
</div>
</body>
diff --git a/howto/new-command.html b/howto/new-command.html
index 0f970bdb4..6cf3589ac 100644
--- a/howto/new-command.html
+++ b/howto/new-command.html
@@ -863,7 +863,7 @@ letter [PATCH 0/n].
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:11 PDT
+ 2022-07-18 13:37:59 PDT
</div>
</div>
</body>
diff --git a/howto/rebase-from-internal-branch.html b/howto/rebase-from-internal-branch.html
index 6615a27d2..355a0ccd3 100644
--- a/howto/rebase-from-internal-branch.html
+++ b/howto/rebase-from-internal-branch.html
@@ -895,7 +895,7 @@ the #1' commit.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:16 PDT
+ 2022-07-18 13:38:02 PDT
</div>
</div>
</body>
diff --git a/howto/rebuild-from-update-hook.html b/howto/rebuild-from-update-hook.html
index d5f5f5195..35396e51c 100644
--- a/howto/rebuild-from-update-hook.html
+++ b/howto/rebuild-from-update-hook.html
@@ -847,7 +847,7 @@ This is still crude and does not protect against simultaneous
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:16 PDT
+ 2022-07-18 13:38:01 PDT
</div>
</div>
</body>
diff --git a/howto/recover-corrupted-blob-object.html b/howto/recover-corrupted-blob-object.html
index 69e4d29f8..9433d7f69 100644
--- a/howto/recover-corrupted-blob-object.html
+++ b/howto/recover-corrupted-blob-object.html
@@ -880,7 +880,7 @@ thing.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:15 PDT
+ 2022-07-18 13:38:01 PDT
</div>
</div>
</body>
diff --git a/howto/recover-corrupted-object-harder.html b/howto/recover-corrupted-object-harder.html
index 35187e258..467928364 100644
--- a/howto/recover-corrupted-object-harder.html
+++ b/howto/recover-corrupted-object-harder.html
@@ -1189,7 +1189,7 @@ int main(int argc, char **argv)
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:15 PDT
+ 2022-07-18 13:38:01 PDT
</div>
</div>
</body>
diff --git a/howto/revert-a-faulty-merge.html b/howto/revert-a-faulty-merge.html
index f126538fb..ca47f95ec 100644
--- a/howto/revert-a-faulty-merge.html
+++ b/howto/revert-a-faulty-merge.html
@@ -1025,7 +1025,7 @@ P---o---o---M---x---x---W---x---M2
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:15 PDT
+ 2022-07-18 13:38:01 PDT
</div>
</div>
</body>
diff --git a/howto/revert-branch-rebase.html b/howto/revert-branch-rebase.html
index f0701954e..8272d5c55 100644
--- a/howto/revert-branch-rebase.html
+++ b/howto/revert-branch-rebase.html
@@ -907,7 +907,7 @@ Committed merge 7fb9b7262a1d1e0a47bbfdcbbcf50ce0635d3f8f
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:12 PDT
+ 2022-07-18 13:38:00 PDT
</div>
</div>
</body>
diff --git a/howto/separating-topic-branches.html b/howto/separating-topic-branches.html
index 0d9aa4937..732144ef7 100644
--- a/howto/separating-topic-branches.html
+++ b/howto/separating-topic-branches.html
@@ -841,7 +841,7 @@ o---o"master"</code></pre>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:14 PDT
+ 2022-07-18 13:38:01 PDT
</div>
</div>
</body>
diff --git a/howto/setup-git-server-over-http.html b/howto/setup-git-server-over-http.html
index b4f1267e4..095f96f77 100644
--- a/howto/setup-git-server-over-http.html
+++ b/howto/setup-git-server-over-http.html
@@ -1071,7 +1071,7 @@ help diagnosing the problem, but removes security checks.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:14 PDT
+ 2022-07-18 13:38:01 PDT
</div>
</div>
</body>
diff --git a/howto/update-hook-example.html b/howto/update-hook-example.html
index b7ba60a9d..5da027b78 100644
--- a/howto/update-hook-example.html
+++ b/howto/update-hook-example.html
@@ -930,7 +930,7 @@ that JC can make non-fast-forward pushes on it.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:14 PDT
+ 2022-07-18 13:38:00 PDT
</div>
</div>
</body>
diff --git a/howto/use-git-daemon.html b/howto/use-git-daemon.html
index f68f4f0ce..31901b04c 100644
--- a/howto/use-git-daemon.html
+++ b/howto/use-git-daemon.html
@@ -791,7 +791,7 @@ a good practice to put the paths after a "--" separator.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:13 PDT
+ 2022-07-18 13:38:00 PDT
</div>
</div>
</body>
diff --git a/howto/using-merge-subtree.html b/howto/using-merge-subtree.html
index a1288e6ea..37a9490fc 100644
--- a/howto/using-merge-subtree.html
+++ b/howto/using-merge-subtree.html
@@ -848,7 +848,7 @@ Please note that if the other project merges from you, then it will
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:12 PDT
+ 2022-07-18 13:38:00 PDT
</div>
</div>
</body>
diff --git a/howto/using-signed-tag-in-pull-request.html b/howto/using-signed-tag-in-pull-request.html
index 6eb038f2b..be2ebbfc5 100644
--- a/howto/using-signed-tag-in-pull-request.html
+++ b/howto/using-signed-tag-in-pull-request.html
@@ -952,7 +952,7 @@ as part of the merge commit.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-07-12 09:59:13 PDT
+ 2022-07-18 13:38:00 PDT
</div>
</div>
</body>
diff --git a/revisions.txt b/revisions.txt
index cef8c3c66..e3e350126 100644
--- a/revisions.txt
+++ b/revisions.txt
@@ -96,19 +96,16 @@ some output processing may assume ref names in UTF-8.
before the current one.
'[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
- The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
- refers to the branch that the branch specified by branchname is set to build on
- top of (configured with `branch.<name>.remote` and
- `branch.<name>.merge`). A missing branchname defaults to the
- current one. These suffixes are also accepted when spelled in uppercase, and
- they mean the same thing no matter the case.
+ A branch B may be set up to build on top of a branch X (configured with
+ `branch.<name>.merge`) at a remote R (configured with
+ `branch.<name>.remote`). B@{u} refers to the remote-tracking branch for
+ the branch X taken from remote R, typically found at `refs/remotes/R/X`.
'[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
The suffix '@\{push}' reports the branch "where we would push to" if
`git push` were run while `branchname` was checked out (or the current
- `HEAD` if no branchname is specified). Since our push destination is
- in a remote repository, of course, we report the local tracking branch
- that corresponds to that branch (i.e., something in `refs/remotes/`).
+ `HEAD` if no branchname is specified). Like for '@\{upstream\}', we report
+ the remote-tracking branch that corresponds to that branch at the remote.
+
Here's an example to make it more clear:
+