If we have a git commit hash:
42f35295744738750a665dc846400c8040659d03
is there a way to determine/calculate the date it was created without any more info?
If we have a git commit hash:
42f35295744738750a665dc846400c8040659d03
is there a way to determine/calculate the date it was created without any more info?
Copyright © 2021 Jogjafile Inc.
Not exactly, no. You can easily extract either of the two time-stamps (author-date and committer-date) but neither one necessarily has anything to do with the actual creation date. For instance:
But, if you are not worried about the computer clock being wildly wrong and/or users deliberately faking their time-stamps, use
%at
or%ct
or any of the variants of those to extract the author or committer time stamps:See the PRETTY FORMATS section of the
git log
documentation for details.