aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-02-27 15:11:50 -0800
committerJunio C Hamano <gitster@pobox.com>2026-02-27 15:11:50 -0800
commitbb9c781f4f4be2e6bf6285149ba7007fdaa735e7 (patch)
tree529e932891733333ad088881a46948f9e87c85aa /Documentation
parentaa95f87c740011f7d21555c5ad7f0870faf4b5c8 (diff)
parent1278a26544e81dddf564fd7730890a7e023ed367 (diff)
downloadgit-bb9c781f4f4be2e6bf6285149ba7007fdaa735e7.tar.xz
Merge branch 'ps/history-ergonomics-updates'
UI improvements for "git history reword". * ps/history-ergonomics-updates: Documentation/git-history: document default for "--update-refs=" builtin/history: rename "--ref-action=" to "--update-refs=" builtin/history: replace "--ref-action=print" with "--dry-run" builtin/history: check for merges before asking for user input builtin/history: perform revwalk checks before asking for user input
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-history.adoc14
1 files changed, 9 insertions, 5 deletions
diff --git a/Documentation/git-history.adoc b/Documentation/git-history.adoc
index 154e262b76..cc019de697 100644
--- a/Documentation/git-history.adoc
+++ b/Documentation/git-history.adoc
@@ -8,7 +8,7 @@ git-history - EXPERIMENTAL: Rewrite history
SYNOPSIS
--------
[synopsis]
-git history reword <commit> [--ref-action=(branches|head|print)]
+git history reword <commit> [--dry-run] [--update-refs=(branches|head)]
DESCRIPTION
-----------
@@ -60,13 +60,17 @@ The following commands are available to rewrite history in different ways:
OPTIONS
-------
-`--ref-action=(branches|head|print)`::
+`--dry-run`::
+ Do not update any references, but instead print any ref updates in a
+ format that can be consumed by linkgit:git-update-ref[1]. Necessary new
+ objects will be written into the repository, so applying these printed
+ ref updates is generally safe.
+
+`--update-refs=(branches|head)`::
Control which references will be updated by the command, if any. With
`branches`, all local branches that point to commits which are
descendants of the original commit will be rewritten. With `head`, only
- the current `HEAD` reference will be rewritten. With `print`, all
- updates as they would be performed with `branches` are printed in a
- format that can be consumed by linkgit:git-update-ref[1].
+ the current `HEAD` reference will be rewritten. Defaults to `branches`.
GIT
---