Search code examples
gitgit-pull

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


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.


Solution

  • The git show command shows the date of the most recent commit. This isn't the date at which the commit was pulled to the local repository, but Git doesn't keep such pull information.

    You may be able to find the time of the last pull using the ctime (creation time) of the files on the server. For example:

    ls -lct
    

    shows the ctime of each file, sorted with the most recent first.