Header

git log

Using git log to view a history of your most recent commits

If you want to quickly view a list of recent commits in a repository, simply type:

$ git log

commit 0dda643e2e05333c686e534d9020d358a1938777 (HEAD -> master, origin/master, 
my-new-branch)
Author: Adam West <adamw@atech.media>
Date:   Mon Sep 2 13:48:58 2019 +0100

    Add edam

commit 56aedbef42a4cadb6d122da408d437ef562fe2ce
Author: Adam West <adamw@atech.media>
Date:   Fri May 31 11:30:27 2019 +0100

    remove old folder

commit 74dd8b3c304c399559dfb29a040a33931eabd13c
Author: Adam West <adamw@atech.media>
Date:   Fri May 31 11:24:32 2019 +0100

    New folder

commit bef03edfe48c6d622fa52015d4378c95676eb91a
Author: Robert Lyall <robert.g.lyall@gmail.com>
Date:   Wed May 15 14:13:06 2019 +0100

    Revert "Add the correct link to Brie"

:

You'll be presented with a list of recent commits in the current branch, with the latest commit at the top. Each commit will show the reference, author, date that it was originally created and finally the message.

You may also notice that the top commit also has the text (HEAD -> master, origin/master, my-new-branch) next to the reference. These 3 items mean the following:

  • HEAD -> master - Your current, local working copy of the repository is at this point and on the master branch
  • origin/master - Your remote master branch is also at this point
  • my-new-branch - Your local my-new-branch branch is also at this point

Proudly powered by Katapult. Running on 100% renewable energy.