Git Stores Two Timestamps Per Commit — Here Is What Each One Means
Every Git commit contains two separate dates: an Author Date, recording when the work was originally written, and a Commit Date, recording when the commit object itself was created. In most day-to-day workflows the two are identical, so many developers never notice the difference. The gap between them appears when history is rewritten through operations like rebase, cherry-pick, or amend, which generate new commit objects and update the Commit Date while leaving the Author Date unchanged. This distinction explains why GitHub sometimes displays a date that differs from when code was originally authored. Notably, altering even just a timestamp changes the commit hash, since Git includes all metadata when computing it.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in