Search⌘ K

The 'git log' Command

Explore how to effectively use the git log command to visualize and customize the commit history in a Git repository. Learn different flags such as --oneline, --graph, --all, and --decorate to understand commit details, merges, branches, and the overall project history.

git log

We have already seen git log earlier in the course.

The output is the most recent commit, down to the oldest from the current branch.

1	git log
Terminal 1
Terminal
Loading...

git log --oneline

Most of the time, I don’t care about the author or the date. In order to see more per screen, I use -–oneline to only show the commit ID and comment per-commit.

2	git log --oneline
Terminal 1
Terminal
Loading...

git log --graph

The problem with the above is that you only see a linear series of commits from the HEAD and do not get a sense of what was merged in where.

 ...