From time to time, you’ll want to check the commit logs. You may use git log to check the log.

There are different formats and filters you can apply to the log.

Time for Action—Viewing log

  1. Go into any working project with git version controlled.

  2. View the log with git log

     $ git log
    
  3. Use --oneline to view the log in minimal mode. (One line with only comment).

     $ git log --oneline 
    

Exercise 1

I prepared a git repo with several commits. Please use git log to view the commits. Try exploring different flags to view the differences.

Exercise 2

I prepared a git repo with several commits. Please use git log to view the commits. Try exploring different flags to view the differences.

Recourses

Git log