table of contents
- experimental 1:2.53.0+next.20260227-1
| GIT-HISTORY(1) | Git Manual | GIT-HISTORY(1) |
NAME¶
git-history - EXPERIMENTAL: Rewrite history
SYNOPSIS¶
git history reword <commit> [--dry-run] [--update-refs=(branches|head)]
DESCRIPTION¶
Rewrite history by rearranging or modifying specific commits in the history.
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
This command is related to git-rebase(1) in that both commands can be used to rewrite history. There are a couple of major differences though:
Overall, git-history(1) aims to provide a more opinionated way to modify your commit history that is simpler to use compared to git-rebase(1) in general.
Use git-rebase(1) if you want to reapply a range of commits onto a different base, or interactive rebases if you want to edit a range of commits at once.
LIMITATIONS¶
This command does not (yet) work with histories that contain merges. You should use git-rebase(1) with the --rebase-merges flag instead.
Furthermore, the command does not support operations that can result in merge conflicts. This limitation is by design as history rewrites are not intended to be stateful operations. The limitation can be lifted once (if) Git learns about first-class conflicts.
COMMANDS¶
The following commands are available to rewrite history in different ways:
reword <commit>
OPTIONS¶
--dry-run
--update-refs=(branches|head)
GIT¶
Part of the git(1) suite
| 03/01/2026 | Git 2.53.0.697.g625c4f |