Commit timestamps in GitHub don't match repo #22695
-
I have various old git repos, including one or two converted from older repo managers (e.g. Perforce). They include commit comments from many years ago—some of the commits are older than a couple of the people I work with! But now that these projects are in GitHub, the commit dates are completely wrong. If I type The way I went about it was to create a new (private) repo in GitHub, type Does GitHub just not like old dates, or is there data somewhere in my git repos that might not necessarily match what’s in the git log? I know I’ve used Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hey hey @mscheper! I guess I’m curious what you do see in GitHub? Do you see dates for these commits as the time they were committed? Or an even less accurate, irrelevant date? If it’s displaying the date it was committed, and not the historic commit date you see in I want to elevate our relevant docs, but also, this ol SO post. Between these two, you should have what you need, but the remote add might not be updating both author and commit dates from your history. If there is anything more GitHub-specific that isn’t answered in those threads, follow up and I’ll do what I can! |
Beta Was this translation helpful? Give feedback.
-
I didn’t realise there was a distinction between the ‘author date’ and ‘commit date’. It does seem odd that GitHub would choose to show a different date from what’s in the logs, but I’m sure some thought went into that decision, and I know a lot of people are more comfortable with history being rewritten than I. 🙂 I fixed it with these commands:
GitHub doesn’t seem bothered by dates older than it is, either. 😉 Thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
Not a problem at all! I’m glad I could be helpful 🙇 |
Beta Was this translation helpful? Give feedback.
I didn’t realise there was a distinction between the ‘author date’ and ‘commit date’. It does seem odd that GitHub would choose to show a different date from what’s in the logs, but I’m sure some thought went into that decision, and I know a lot of people are more comfortable with history being rewritten than I. 🙂
I fixed it with these commands:
GitHub doesn’t seem bothered by dates older than it is, either. 😉
Thanks for your help!