31 | Filtering the Log Output |
Gitâs log is useful way to track what the original
developerâoften yourselfâwas thinking when they made a change,
but it often provides too much information. You can use
git log
âs many parameters to filter the
results it displays, zeroing in on the information thatâs important
to you.
You can start to filter the results by providing Git with a
directory or path. You specify the path as the last parameter. To
be safe, separate the path from other parameters with
--
(two dashes). Otherwise, Git
canât tell the difference between the branch or tag
work
and the path
work
.
You can also filter the log based on the time of the commit. Using
the --since
or
--after
parameter, you can look at commits after ...
Get Pragmatic Guide to Git now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.