Show a diff inside of git log
Posted on 2019-05-01
If you've ever needed to view all the changes that are happening in a repository
or a branch, there are two flags for the git log
command that should interest
you: git log -c
and git log --cc
.
Using git log -c
shows you a diff view of changes made in each commit
referenced in the log. If you're viewing a single branch, you can view the
line-level changes, commit by commit, that went into getting the current branch
to where it is. Very handy!
The --cc
flag does the same thing, but it hides some automatic merge changes.
I haven't seen very much difference in the behavior of these two flags myself.
Tags: git