How do I check the date and time of the latest `git pull` that was executed?

Chirag Patel picture Chirag Patel · Jun 8, 2010 · Viewed 67.5k times · Source

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.

Answer

smoove picture smoove · Feb 10, 2012
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.