git history was introduced in Git 2.54, released on April 20, 2026. It comes into play when you need to reword a commit message or split a commit into two. It doesn't bring anything fundamentally new — it simplifies and shortens what was already possible with git rebase.
git history vs git rebase
git rebase actually does two separate things:
- Replaying commits onto a new base (its main job).
- Editing commits along the way (a side job).
The key point here is that git rebase -i does both at the same time. But in most cases, developers only want the second one — just "change that commit message."
That's exactly where git history steps in.
It takes that side job and turns it into a standalone command. It doesn't replay commits, doesn't touch your working tree. It goes directly into your history and changes one thing. Think of it this way:
- rebase -i — demolish the building and rebuild it, just with a few rooms laid out differently.
- git history — repaint one room.
How Does git history Work? What Are Its Advantages Over git rebase?
Say we want to edit a commit in Git. The classic way to do that is git rebase -i. But rebase involves multiple steps:
- It affects the working tree
- It modifies the index
- If a conflict occurs, you can get stuck mid-operation
- Even fixing a typo requires setting up a to-do list
git history is a more focused tool. It currently handles two tasks: rewording a commit message and splitting a commit (both of which previously required git rebase -i).
One notable difference is that git history can operate without a working tree. Commands like git rebase -i normally require a workspace with the actual files present. Since git history modifies the commit history directly, it doesn't need that. This means it can even run on bare repositories — those that contain only the .git data with no working tree. This is particularly useful for server-side operations or automated maintenance tasks.
Rewording a Commit Message with git history
git history reword <commit> changes a commit's message. It doesn't touch the working tree or the index, and it automatically updates any branch references built on top of that commit.
git history reword abc1234
# your editor opens and you update the message.
Doing the same thing with git rebase:
# same operation with git rebase
git rebase -i HEAD~3
# mark the commit as reword in the list.
# save and exit.
# editor opens, update the message.
# rebase completes.
The difference is clear: rebase takes 4–5 steps, while git history reword takes one.
Splitting a Commit with git history
git history split <commit> splits the changes in a single commit into two separate commits. It works like git add -p — you choose which changes to carve out into a new commit.
git history split HEAD
# the diff is shown, you select the hunks.
# git creates two separate commits.
When to Use git rebase vs git history?
Even though git history takes over some tasks from git rebase, there are still cases where git rebase is the right tool. See the table below for a quick reference.
| Task | Tool |
|---|---|
| Reword a commit message | git history reword |
| Split a commit into two | git history split |
| Reorder commits | git rebase -i |
| Squash commits | git rebase -i |
| Rebase a branch onto a new base | git rebase |
| Edit history containing merge commits | git rebase -i |
Limitations of git history
- git history does not work on histories that contain merge commits. Use git rebase -i for those.
- git history refuses to run if the operation would result in a merge conflict.
- It is still experimental, so its interface may change in future releases. Keep that in mind before using it in scripts or automated workflows.
One of the current limitations of git history is that it doesn't support histories with merge commits. Unlike regular commits, merge commits combine multiple lines of history together. git history is designed for straightforward, linear history edits. If there's a merge commit in the way, Git considers the operation too risky and refuses to proceed. For more complex history rewriting, git rebase -i remains the right tool.
To summarize: git rebase is still a necessary tool, but it's a powerful one — and that power can be risky for simple tasks. What the Git team did with git history was extract some of that functionality into a dedicated command. As mentioned at the start, git history doesn't add new capabilities to Git, but it lets you achieve the same results in fewer steps and with less risk. It fills the gap where git rebase -i was simply too much for the job.