git commit --date='2024-01-15 10:30'

Category: Git - Core

git commit --date='2024-01-15 10:30'

Commit with a backdated timestamp

Sets the author date of the commit instead of using the current clock. Common for keeping imported history in order or correcting an inaccurate system clock. Git accepts most date formats, including ISO dates and relative forms like 3 days ago.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.