https://github.com/stevenacoffman/git-restore-mtime
Restore original modification time of files based on the date of the most recent commit that modified them
https://github.com/stevenacoffman/git-restore-mtime
Last synced: 26 days ago
JSON representation
Restore original modification time of files based on the date of the most recent commit that modified them
- Host: GitHub
- URL: https://github.com/stevenacoffman/git-restore-mtime
- Owner: StevenACoffman
- License: mit
- Created: 2021-08-06T02:03:11.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-06T02:08:27.000Z (almost 5 years ago)
- Last Synced: 2026-03-25T21:00:11.248Z (3 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-restore-mtime
*Restore original modification time of files based on the date of the most recent commit that modified them*
Git, unlike other version control systems, does not preserve the original timestamp of committed files. Whenever repositories are cloned, or branches/files are checked out, file timestamps are reset to the current date. While this behavior has its justifications (notably when using `make` to compile software), sometimes it is desirable to restore the original modification date of a file (for example, when generating release tarballs). As git does not provide any way to do that, `git-restore-mtime` tries to workaround this limitation.
For more information and background, see http://stackoverflow.com/a/13284229/624066
This Go source code was originally from [Steve Penny](https://stackoverflow.com/users/1002260/steven-penny) from https://stackoverflow.com/a/62683363/2904179
(and I am a different Steve 😀).