Is there a simple Git command to determine the “creation date” of a file in a repository, i.e. the date it was first added?
It would be best if it can determine this even through file renames/moves. I’d like it to be a computer-readable one-line output; it may be that I haven’t figured out the correct git log <fname> options to do this.
git log --follow --format=%ad --date default <FILE> | tail -1With this command you can out all date about this file and extract the last
The option
%adshows the date in the format specified by the –date setting, one ofrelative,local,iso,iso-strict,rfc,short,raw,human,unix,format:<strftime-string>,default.