log at the command line
There are a large number of flags you can add to log
to control its output. In creating the lg
alias, we already saw how to use log -–oneline
:
Figure 9.9: Using log at the command line
Looking closely, we see that the left column has the short ID, the right column lists the messages associated with each commit, and for both the first and last commits, we also see where the head pointer is; both locally and on origin.
Which files changed?
If you want to know which files were changed in each commit but not see what those changes were, you would use:
git log ––name-only
Here is an excerpt:
Figure 9.10: Using log to see file changes
We see two commits. The first, in Program.cs
, has the message Call the add function
, and you can also see the full ID, the author, and when this commit was made.
You can of course do the same thing with our lg
alias to condense the output:
Figure 9.11: Using...