git-edit-date vs amend, rebase, filter-branch & filter-repo
There are several ways to change git commit dates.
Here is an honest comparison to help you pick the right tool —
from git commit --amend for one commit to CSV bulk edits for a whole branch.
Comparison table
| git-edit-date | git commit --amend | interactive rebase | filter-branch | filter-repo | |
|---|---|---|---|---|---|
| Bulk edit dates | CSV in spreadsheet | Last commit only | One commit at a time | Shell env-filter script | Python callback script |
| Edit author email | Yes | Last commit only | Manual per commit | env-filter | mailmap / callback |
| Visual review before apply | Spreadsheet | No | No | No | No |
| Learning curve | Low | Low | Medium | High | Medium |
| Officially maintained | Active | Built into git | Built into git | Deprecated | Recommended replacement |
| Best for | Branch-level bulk fixes via CSV | Fix the tip commit only | 1–3 recent commits | Legacy one-off scripts | Complex repo-wide migrations |
When to use git-edit-date
- You have many commits to fix on a single branch
- You want to sort, filter, and review dates in Excel or LibreOffice
- You need to change both author and committer dates with timezone offsets
- You want a simple export → edit → apply workflow without writing shell scripts
When to use git commit --amend
- Only the latest commit needs a date or author fix
- You have not pushed yet, or you are fine rewriting just the tip
- A one-liner is enough, for example
GIT_AUTHOR_DATE=… GIT_COMMITTER_DATE=… git commit --amend --no-edit
Amend stops at one commit. If you need to fix dates across a branch, use the CSV tutorial instead of repeating amend or rebase stops.
When to use interactive rebase
- Only the last commit (or very few) needs a date change
- You are already in a rebase flow for squashing or reordering
- You are comfortable with
git rebase -iand amend commands
When to use filter-branch
You probably shouldn’t. Git officially deprecated filter-branch
in favor of filter-repo. It remains in old tutorials and Stack Overflow answers,
but the env-filter syntax is error-prone for date rewrites.
When to use filter-repo
- Entire repository history needs restructuring
- You are removing secrets, splitting repos, or doing large-scale author remapping
- Performance and safety matter more than spreadsheet convenience
For complex cases, filter-repo is the right modern tool. git-edit-date wins when you want a spreadsheet and a quick branch-level fix.
Try git-edit-date
curl -LO https://giteditdate.com/git-edit-date_amd64.deb
sudo dpkg -i git-edit-date_amd64.deb
git-edit-date export -o commits.csv
Step-by-step: tutorial · Guides: blog · Common questions: FAQ · Commands: docs