Skip to content

git log#

After we've committed our staging area, we get a commit. This commit goes into a log. We can check this log easily enough:

1
2
3
4
5
6
$ git log
commit 82c315f63330f94b2321fc1b8326be3953058927 (HEAD -> master)
Author: Michael Crilly <mike@upload.academy>
Date:   Sat Apr 23 13:13:08 2022 +1000

    We needed a file for greeting people.

We can see our (full) commit hash is 82c315f63330f94b2321fc1b8326be3953058927. We got a summary version of it earlier, 82c315f, which is the first seven characters.

We can also see the author of the commit: Michael Crilly <mike@upload.academy>. The date is also present.

Finally we can see the message I provided for the commit.

If you have a lot of entries in your repository's log, you can use -1 to only display the first commit message: git log -1.

Now it's time to look at branching. This is a bigger topic, but an important one.