You can actually determine what you want using the request you specifically mentioned.
Note that all dates/times below are under GMT (of course).
Copy & paste the following command to find the last modified date and time of Folder/File in repository ForStackExchange by user YenForYang:
\curl -sIA. --ignore-content-length \
-H"If-Modified-Since: Sun May 01 00:00:00 9999" \
"https://api.github.com/repos/YenForYang/ForStackExchange/contents/Folder/File?ref=branch" \
| \grep -m1 -oP "(?<=Last-Modified: )[ADFJMNOSTWa-eghilnoprtuvy0-9:, ]{25}" \
(If Perl regex isn't available, you can ... | grep -F -m1 "Last-Modified:"
)
The above command should return (GMT): Thu, 27 Dec 2018 11:01:26
(or later, if I update the file for some reason)
Note that if the ref
parameter is unspecified, ref=master
.
And if you can't copy and paste, and don't care about the API rate limits, you might opt for the shorter:
\curl -sIL "api.github.com/repos/yenforyang/forstackexchange/contents/Folder/File?ref=branch" | \grep "^Las"
And if ya don't have grep
on Windows just use find "Last-Modified: "
instead (doubles quotes are necessary).
And if you don't have curl on Windows (download it...or) use Powershell
(iwr -me HEAD -usebasic "https://api.github.com/repos/yenforyang/forstackexchange/contents/Folder/File?ref=branch").Headers."Last-Modified"