Git clone changes file modification time

clone, git

Solution

Git does not record timestamp for the files, since it is a Distributed VCS (meaning the time on your computer can be different from mine: there is no "central" notion of time and date)

The official argument for not recording that metadata is explained in this answer.

But you can find scripts which will attempt to restore a meaningful date, like this one (or a simpler version of the same idea).

Problem

When I clone a Git repository using the "`git clone ...`" command, all cloned files in my local repository have the same modification time with date and time as when the `git clone` command was issued. Is there a way to clone a remote Git repository with the actual modification time for each file?

Original source

Related problems