Git Log Options
git log is a command in Git that shows the commit history of your repository.
git log is a command in Git that shows the commit history of your repository. It provides a detailed view of all commits, including their hashes, authors, dates, and messages.
Here are some common git log options:
-2: Only show the last two commits.-- <file-name>: Show the commits that modified a specific file.--all: Show all branches in the repository.--graph: Display the commit history as a graph.--pretty: Enable clean colorized output.--no-color: Disable colorized output.--stat: Show a statistical summary of changes.**-S: Only show commits with modified files.
You can combine these options to tailor your log output to suit your needs.
For example, git log -2 --graph will display the last two commits in graph form.
Free Resources
official: