How do I edit git commit dates?
Wrong timezone, a clock that drifted, commits under the wrong name —
and suddenly you’re fighting filter-branch at midnight.
I built a small CLI so you don’t have to.
Export the branch to CSV, tweak author date, committer date, author name, and email in Excel or LibreOffice, then apply a bulk rewrite in one command.
Why CSV?
- Bulk edits — fix dozens of commits in a spreadsheet instead of one-by-one rebase stops
- Visual review — sort by date, spot timezone drift, compare author vs committer timestamps
- No shell scripting — skip
filter-branchenv-filters and fragile one-liners
New here? Start with the step-by-step tutorial, read the FAQ, or see how we compare to rebase and filter-branch.
Example
Say your log looks like this — wrong email, timestamps in UTC at 3 am:
a1b2c3d Alice <alice@wrong.com> 2024-03-06 03:14 +0000 Fix login
e4f5a6b Alice <alice@wrong.com> 2024-03-06 03:15 +0000 Add tests
9f8e7d6 Alice <alice@work.com> 2024-03-05 14:30 +0100 Fix login
c5b4a39 Alice <alice@work.com> 2024-03-05 15:00 +0100 Add tests
What changed: author email and dates. Messages stay the same; commit hashes are new (history rewrite).
How
1. Export the current branch:
git-edit-date export -o commits.csv
2. Open the CSV and fix the fields you care about:
author_email,author_date,committer_date
alice@wrong.com,2024-03-06T03:14:00Z,2024-03-06T03:14:00Z
alice@wrong.com,2024-03-06T03:15:00Z,2024-03-06T03:15:00Z
author_email,author_date,committer_date
alice@work.com,2024-03-05T14:30:00+01:00,2024-03-05T14:30:00+01:00
alice@work.com,2024-03-05T15:00:00+01:00,2024-03-05T15:00:00+01:00
3. Apply and push:
git-edit-date apply -file=commits.csv
git push --force-with-lease
Full walkthrough: how to change git commit dates.
Install
curl -LO https://giteditdate.com/git-edit-date_amd64.deb
sudo dpkg -i git-edit-date_amd64.deb
Heads up
- Rewrites commit SHAs on the current branch only
- Invalidates GPG signatures on rewritten commits
- Needs
git push --force-with-leaseif the branch was already pushed