I have a jekyll site, and I want to find the last commit date of a certain post using ruby/grit.
I know that I can do the following using git:
git log -1 --format="%cd" -- <file>
How can I do something equivalent using ruby/grit please?
I have a jekyll site, and I want to find the last commit date of a certain post using ruby/grit.
I know that I can do the following using git:
git log -1 --format="%cd" -- <file>
How can I do something equivalent using ruby/grit please?
From the File documentation for mtime:
File.mtime("testfile") #=> Tue Apr 08 12:58:04 CDT 2003Ruby also supports
ctime, which is when the directory information for the file was changed. On Windowsctimeis a little different behavior, because Windows supports creation times for files, unlike Linux and Mac OS.