The "git log" Command
A frequently used git command is git log
. This command is used to show the history of the commits you have made. In this lesson, you’ll learn about checksums (also known as SHA) and how to use git log
.
00:00
git log
. It’s a handy command that shows your commit history. You’ll use git log
when you’re hunting bugs, checking which version you’re on, and seeing what other commits have taken place when you’re working with a team.
00:16
So, let’s hop into the console and take a look at git log
.
00:21
Okay. So we’re back in the console. We’re just going to run git log
. Each block here is a commit. You can see the two commits we’ve made, you can see the messages, the date, and who done it.
00:35
You can see there the Author
row—that is the Git identity information that we initially configured. And this crazy looking string here is called a checksum.
00:45 It’s a unique identifier and it’s another part of the secret sauce of Git. When something within these files changes, their checksum changes and Git knows it.
00:56 Git checksums everything and it compares checksums to know when changes have occurred. So, one thing here. You might hear this called a few different things when you’re out in the real world.
01:08 You might hear it called a SHA or a hash. They are synonymous with this number, this checksum, which is a unique identifier or a fingerprint. Also of note here is this little parenthetical right here.
01:24 What could this be? Let’s talk about it in the next video.
Become a Member to join the conversation.