| 30 | Viewing the Log |
Git’s bread and butter is tracking changes to files in your project over a period of time. You use the log to view that history.
You can use git log to view the standard
log output. Git displays the commit ID, author, date, and commit
message for each commit in reverse chronological order. Git sends
the output through less to keep the output
from scrolling past on the screen too fast to be seen.
You can use the --oneline parameter
to shorten the log display to show the first seven characters of the
commit ID and the subject of the log message. It increases the
number of commits you can view on one screen and with properly
written log messages makes scanning easier.
Viewing the entire history often gives you too much ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access