Is there a way to set the file creation date of all committed files to the time of the latest commit?
Asked
Active
Viewed 214 times
0
-
What exactly are you asking for? Git doesn't track creation dates. – Lily Ballard Jun 26 '12 at 18:49
3 Answers
1
What you want is can be done with the help of git filter-branch
with environment filter. For details look for related issue: How can one change the timestamp of an old commit in Git?

Community
- 1
- 1

lisachenko
- 5,952
- 3
- 31
- 51
0
is there a reason you would like to do this? You should be able to use git commands to see when files were last changed. Relying on the file system could lead to trouble.
The short answer is no.

Adam Dymitruk
- 124,556
- 26
- 146
- 141
0
A git pre-commit hook, combined with something like touch would probably work.
This would be local only - git doesn't track the creation dates.
However, I'm struggling to come up with a valid use-case for such a hook.

simont
- 68,704
- 18
- 117
- 136
-
Thank you. the use case is: I am moving from SVN where I used the creation dates as a build management help. – Brian Johnson Jun 26 '12 at 19:47