git-edit-date

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.

Download .deb v1.4 Linux amd64 · free

Why CSV?

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:

Before · git log
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
After · git log
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:

Before · commits.csv
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
After · commits.csv
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