![Forrest logo](/images/logo.png)
git-log:tldr:872e6
git-log: Show a graph of commits in the current branch using only the first line of each commit message.
$ git log --oneline --graph
try on your machine
The command "git log --oneline --graph" is used to display a summarized and graphical representation of the commit history in a Git repository.
Here is a breakdown of the command:
- "git log" is the main command used to view the commit history of a repository.
- "--oneline" is an option that shows each commit on a single line, providing a condensed view. It displays the first few characters of the commit hash along with the commit message.
- "--graph" is another option that adds a graphical representation of the commit history. It shows the branching and merging of commits, allowing you to visualize the relationships between different branches.
Combining both options, "git log --oneline --graph" gives you a concise and visual overview of the commit history, making it easier to understand the project's development and the relationships between various branches.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.