From the course: Git for System Administration

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Analyzing Git commit history

Analyzing Git commit history - Git Tutorial

From the course: Git for System Administration

Start my 1-month free trial

Analyzing Git commit history

- [Instructor] Now that we have some commits in our Git project, let's take a look at our Git log. Type in git space log and hit Enter. Here we can see all of our commits. We currently have two with the oldest being at the bottom. That commit is labeled initial commit. This is an appropriate message for the first commit. Our second commit is near the top. We also see who committed the change as well as the time and date of the commit. If we want to show the most recent commit only, we can limit the output of Git log. The syntax is similar to the head and tail command. Type in clear and then type in git log -n 1 and hit Enter. This shows the most recent or last commit. We can also specify a date. If we want to view all commits since a certain date, we can specify it. My commits were all done on May 15th, 2019, so if I want to show them, I'd type in git log --since equals 2019-05-14 which will be yesterday. This could be useful if you come into work and pull down the latest commits to a…

Contents