Back to feed
Dev.to
Dev.to
7/10/2026
How to Change the Date of an Old Git Commit

How to Change the Date of an Old Git Commit

Short summary

A tutorial on changing Git commit dates using git commit --amend for the latest commit and interactive rebase for older commits. Changing any timestamp creates a new commit hash since Git hashes the entire commit object. The author promotes their tool GitEditDate for bulk date editing to avoid tedious rebase workflows.

  • Use git commit --amend with GIT_COMMITTER_DATE for the most recent commit
  • Use interactive rebase (git rebase -i) to edit older commit dates, which rewrites history and changes hashes
  • Author promotes GitEditDate tool for bulk commit date editing without manual rebase steps

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more