1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Version Control with Git

Exercise

How can I view a repository's history?

The command git log is used to view the log of the project's history. Log entries are shown most recent first, and look like this:

commit 0430705487381195993bac9c21512ccfb511056d
Author: Rep Loop <[email protected]>
Date:   Wed Sep 20 13:42:26 2017 +0000

    Added year to report title.

The commit line displays a unique ID for the commit called a hash; we will explore these further in the next chapter. The other lines tell you who made the change, when, and what log message they wrote for the change.

When you run git log, Git automatically uses a pager to show one screen of output at a time. Press the space bar to go down a page or the 'q' key to quit.


You are in the directory dental, which is a Git repository. Use a single Git command to view the repository's history. What is the message on the very first entry in the log (which is displayed last)?

Keep in mind that not all entries may be visible on the first screen, and that you might need to check additional pages to see the very first entry.

Instructions

50 XP

Possible answers