Skip to content

Commit 9d5bc4e

Browse files
committed
Merge branch 'ps/history-ergonomics-updates' into next
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
2 parents 5397753 + 1278a26 commit 9d5bc4e

3 files changed

Lines changed: 182 additions & 106 deletions

File tree

Documentation/git-history.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-history - EXPERIMENTAL: Rewrite history
88
SYNOPSIS
99
--------
1010
[synopsis]
11-
git history reword <commit> [--ref-action=(branches|head|print)]
11+
git history reword <commit> [--dry-run] [--update-refs=(branches|head)]
1212

1313
DESCRIPTION
1414
-----------
@@ -60,13 +60,17 @@ The following commands are available to rewrite history in different ways:
6060
OPTIONS
6161
-------
6262

63-
`--ref-action=(branches|head|print)`::
63+
`--dry-run`::
64+
Do not update any references, but instead print any ref updates in a
65+
format that can be consumed by linkgit:git-update-ref[1]. Necessary new
66+
objects will be written into the repository, so applying these printed
67+
ref updates is generally safe.
68+
69+
`--update-refs=(branches|head)`::
6470
Control which references will be updated by the command, if any. With
6571
`branches`, all local branches that point to commits which are
6672
descendants of the original commit will be rewritten. With `head`, only
67-
the current `HEAD` reference will be rewritten. With `print`, all
68-
updates as they would be performed with `branches` are printed in a
69-
format that can be consumed by linkgit:git-update-ref[1].
73+
the current `HEAD` reference will be rewritten. Defaults to `branches`.
7074

7175
GIT
7276
---

0 commit comments

Comments
 (0)