Skip to main content

How to change a commit timestamp

Updated 1 min readMarkdown
How to change a commit timestamp

You may need to change the datetime of a commit in some situations. For example, some countries use daylight saving time period and because of it, some commits can have the wrong timestamp.

git commit --amend --date "Thu Feb 15 22:37:31 2018 +0300"

You should commit and then you can change the timestamp later.

References

  1. https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---dateltdategt

About the author

  • Hey, y’all 🖖🏽 I am a passionate self-taught developer, open-source advocate, and tech enthusiast with a hands-on approach to problem-solving and an unending thirst for knowledge. Anything and everything classified as technology fascinate me.

No comments yet. Be the first to comment.