nicomp
nicomp

Reputation: 4647

GitHub commit log seems inconsistent with respect to commit dates

Today is December 16, 2017. I just screen-snipped this GitHub commit log: Screen Snip from GitHub commit log

If today is 12/16, why does a commit from 12/14 appear as 5 days ago?

Upvotes: 0

Views: 131

Answers (2)

Joseph K.
Joseph K.

Reputation: 1223

As @einpoklum has mentioned, you committed and pushed on different days.

Although it is not advised to do it frequently, if you must change the date, then you can do so by passing the --date flag when running git commit. For information on formatting, you can check out this link, what-is-the-format-for-date-parameter-of-git-commit

Upvotes: 3

einpoklum
einpoklum

Reputation: 131544

Perhaps the commits were made 5 or 7 days ago, but you only git pushed them to GitHub on the 14th.

Upvotes: 4

Related Questions