Using git locally—Git log
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
-
Go into any working project with git version controlled.
-
View the log with
git log
$ git log
-
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.