How do I check the date and time of the latest git pull
that was executed? I frequently need to know when the code changed on a server when something goes wrong.
stat -c %Y .git/FETCH_HEAD
Will give you a unix timestamp of the last modification of that file. Git writes the FETCH_HEAD file every time you pull or fetch, even if there was nothing to pull.