I would like to push one of my old archived projects up to GitHub and I'd like to keep the original file date (27/08/2011). Is it possible? Thanks.
Asked
Active
Viewed 1,080 times
1 Answers
2
Each commit stores the date the commit has been authored and the date the commit has been committed into the repository.
Performing a git log --format=fuller
operation of a repository will print those dates.
When you push to GitHub, those commits are being pushed unmodified, with all their meta-data information. Thus the dates those commits have been performed on will be preserved.

nulltoken
- 64,429
- 20
- 138
- 130
-
Thanks! In the meantime I found that I have to specify or amend the commit date. Do you know how can I do that? – Kalman Speier Apr 05 '12 at 20:24
-
1Something like `git commit --amend --date="Wed Feb 16 14:00 2037 +0100"` should do the trick. See the [documentation](http://schacon.github.com/git/git-commit.html) for a more in-depth explanation. – nulltoken Apr 05 '12 at 20:44
-
2The following almost did the trick: ``SET GIT_AUTHOR_DATE="2011-08-27T21:48:00"`` ``SET GIT_COMMITTER_DATE="2011-08-27T21:48:00"`` ``git commit -m "archive"`` GitHub says last commit was 7 months ago, but the repository is updated "just now". Hmm, anyway doesn't worth to spend more time on this. Thanks for your help! – Kalman Speier Apr 05 '12 at 21:17
-
1"just now" refers to the lastest push date. It only relates to the repository activity from the GitHub standpoint. – nulltoken Apr 05 '12 at 21:34