Commit History
After you have created several commits, or if you have cloned repository and you would like to see what has happened to the repository over the period of time. The most basic and powerful command to do this is the git log command.
When you run git log command in your working directory, you should get output that looks something like this:
$ git log
commit 7f0f66a4326d7c94cd0fa0e565b0fdbad82c8238 (HEAD -> master)
Author: Kalpesh Mahida <[email protected]>
Date: Fri Apr 1 23:11:02 2022 +0530
make university awesome
commit 0746f1f50bf3c38100b0fb36429cf8a01c8625e0
Author: Kalpesh Mahida <[email protected]>
Date: Fri Apr 1 22:03:28 2022 +0530
First Commit
The git log command without any argument lists the commits made in that repository in reverse chronological order means the most recent commits show up first.
The command lists each commit with its
- SHA-1 checksum,
- The author’s name and email
- The date written and
- The commit message
The oneline value for this option prints each commit on a single line, which is useful if you’re looking at a lot of commits.
$ git log --oneline
7f0f66a (HEAD -> master) make university awesome
0746f1f First Commit
Previous Next