Commit at a specific date

suggest change
git commit -m 'Fix UI bug' --date 2016-07-01

The --date parameter sets the author date. This date will appear in the standard output of git log, for example.

To force the commit date too:

GIT_COMMITTER_DATE=2016-07-01 git commit -m 'Fix UI bug' --date 2016-07-01

The date parameter accepts the flexible formats as supported by GNU date, for example:

git commit -m 'Fix UI bug' --date yesterday
git commit -m 'Fix UI bug' --date '3 days ago'
git commit -m 'Fix UI bug' --date '3 hours ago'

When the date doesn’t specify time, the current time will be used and only the date will be overridden.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents