---
title: "Discussion on \"Git Hack: Make commit with a past date\" | Hashnode"
description: "Discussion on \"Git Hack: Make commit with a past date\". Hello reader! \nEver wanted to commit something to a git repo with a past date? Here’s how you could do it.\nIf you are working on a project and missed a commit yesterday or you accomplished the task but GitHub for Windows bailed on you? Well, this lit..."
url: "https://hashnode.com/posts/git-hack-make-commit-with-a-past-date/5f65ec356dfc523d0a8932f8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Git Hack: Make commit with a past date](https://ayushirawat.com/git-hack-make-commit-with-a-past-date?utm_source=hashnode&utm_medium=feed)

Hello reader! Ever wanted to commit something to a git repo with a past date? Here’s how you could do it. If you are working on a project and missed a commit yesterday or you accomplished the task but GitHub for Windows bailed on you? Well, this lit...

Sep 19, 2020 · 2 min read · ayushirawat.com  
Updated Jun 16, 2021  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#github](https://hashnode.com/tag/github)
-   [#hack](https://hashnode.com/tag/hack)
-   [#opensource](https://hashnode.com/tag/opensource)

## Written by

[Ayushi Rawat](https://hashnode.com/@ayushi7rawat)

@ayushi7rawat · Pune

  
[View profile](https://hashnode.com/@ayushi7rawat)

Exploring and Refactoring!

Software Engineer | Technical Blogger | YouTuber | Exploring and Refactoring! | connect with me on Twitter

## Responses 2

Markdown supported · ⌘↵ to post

[Lee Hansel Solevilla](https://hashnode.com/@sshanzel)

[Sep 20, 2020](https://hashnode.com/posts/git-hack-make-commit-with-a-past-date/5f65ec356dfc523d0a8932f8/comment/5f66d92835d6463d2b5f8932)

Good stuff.

Though be wary of amending commits (message) when working with other developers. It rewrites the commit which would result as different on those who already pulled it.

[Saifur Rahman Mohsin](https://hashnode.com/@moz)

[Sep 22, 2020](https://hashnode.com/posts/git-hack-make-commit-with-a-past-date/5f65ec356dfc523d0a8932f8/comment/5f66d92835d6463d2b5f8932#reply-5f6a4c9a1c935b2e4c61628b)

You can always commit using:

```
GIT_AUTHOR_DATE="Wed Sep 24 14:12:30 2020 +0530" GIT_COMMITTER_DATE="Wed Sep 24 14:12:30 2020 +0530" git commit -m "message"
```

Been using this trick for years to show clients that the work is consistent over a span of days when in reality I’d build it in the first day or so.

Also, the amend one is fine if the commit is an unpushed commit (repo is local-only still).

[Lee Hansel Solevilla](https://hashnode.com/@sshanzel)

[Sep 23, 2020](https://hashnode.com/posts/git-hack-make-commit-with-a-past-date/5f65ec356dfc523d0a8932f8/comment/5f66d92835d6463d2b5f8932#reply-5f6aa73b1c935b2e4c61644d)

[Saifur Rahman Mohsin](https://hashnode.com/@moz) notice when i mentioned "when working with other developers".

[Saifur Rahman Mohsin](https://hashnode.com/@moz)

[Sep 23, 2020](https://hashnode.com/posts/git-hack-make-commit-with-a-past-date/5f65ec356dfc523d0a8932f8/comment/5f66d92835d6463d2b5f8932#reply-5f6b059d1c935b2e4c616856)

[Lee Hansel Solevilla](https://hashnode.com/@sshanzel) Yeah, I did. Absolutely agree with your point.

[Mark](https://hashnode.com/@mverleg)

[Sep 19, 2020](https://hashnode.com/posts/git-hack-make-commit-with-a-past-date/5f65ec356dfc523d0a8932f8/comment/5f6627e435d6463d2b5f842d)

Interesting, thanks!

Git has a committer and author date, do you happen to know which one(s) this updates?
