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.
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.
git commit --amend --date="Wed Feb 16 14:00 2037 +0100"
should do the trick. See the documentation for a more in-depth explanation - nulltoken 2012-04-05 20:44
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 2012-04-05 21:17