Git Commit History Flags
In order to output the commit history in a shortened form, with only the parameters we need, special flags can be added to the log command:
| Flag | Description |
|---|---|
-p |
Shows the difference in changes for each commit. |
--stat |
Displays statistics for a commit. |
--shortstat |
Shows the number of changes/inserts/deletions when using the --stat command.
|
--name-only |
Displays commit information and names of changed files. |
--name-status |
Displays a message listing the files that were changed, including additions and deletions. |
--relative-date |
Displays the date the changes were applied in relative format (e.g. '1 day ago').
|
--pretty |
Changes the format of the commit history output: =oneline in one line, =full - full and =short - short output.
|
--graph |
Shows the branching of Git branches and their merge history. |
Print information about your commits on one line.