Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep local file date and time when pushing to GitHub

Tags:

git

github

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.

like image 408
Kalman Speier Avatar asked Nov 14 '22 07:11

Kalman Speier


1 Answers

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.

like image 151
nulltoken Avatar answered Nov 15 '22 23:11

nulltoken