Im trying to find the command to get the last modified date of a file in a local git repo.
Created the repo and have done one commit. Had to edit one file and will commi
The correct way to do this is to use git log as follows.
git log -1 --pretty="format:%ci" /path/to/repo/anyfile.any)
-1 restricts it to the very last time the file changed
%ci is just one of the date formats you can choose from others here at https://git-scm.com/docs/pretty-formats
This method is fool proof and 100% accurate.