I did a git pull
but now want to know at what time that happened. Is there a way of checking the time of a pull? Note that NO changes came in when I did the pull. But perhaps the SSH connection is logged? I want to check this on my local machine rather than on the server. Using Linux, git version 2.3.3.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
Pull frequently You should endeavor to keep your local machine as close to the remote repository as possible. The way to do that is to pull all the changes on the remote server to your local copy. You can do this as often as you like, and should do it frequently — at least once a day if not more.
Viewing a list of the latest commits. If you want to see what's happened recently in your project, you can use git log . This command will output a list of the latest commits in chronological order, with the latest commit first.
Git writes the FETCH_HEAD file every time you pull or fetch, even if there was nothing to pull. The file can be found at: .git/FETCH_HEAD
. Just check the last modification time of that file.
In Linux you can use the following to check the last modified time:
date +%s -r .git/FETCH_HEAD
On OSX you can do the following to get the last modified time:
stat -f "%m" .git/FETCH_HEAD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With