May 2018
Beginner to intermediate
452 pages
11h 26m
English
To view your repository's history, run the git log command as follows:
alanm@alanm-laptop:~/ABQ_Data_Entry$ git log
commit df48707422875ff545dc30f4395f82ad2d25f103 (HEAD -> master)
Author: Alan Moore <alan@example.com>
Date: Thu Dec 21 18:12:17 2017 -0600
Initial commit
As you can see, the Author, Date, and commit message is displayed for our last commit. If we had more commits, they would be listed here as well, from newest to oldest. The long hexadecimal value you see in the first line of output is the commit hash, a unique value that identifies the commit. This value can be used to refer to the commit in other operations.
For example, we can use it to reset our repository to a past state, as follows: