Dev.to
7/10/2026

Why Git Has Two Dates: Author Date vs Commit Date
Short summary
Git commits contain two timestamps: Author Date (when the change was originally written) and Commit Date (when the commit object was created). Rebasing, amending, or cherry-picking creates new commit objects, updating the Commit Date while preserving the Author Date. This explains why GitHub sometimes shows different dates than expected, and why changing only a timestamp alters the commit hash.
- •Git stores Author Date and Commit Date separately
- •Rebasing or amending changes Commit Date but preserves Author Date
- •Changing any metadata including timestamps changes the commit hash
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



