Forrest logo
back to the hg tool

hg-log:tldr:2a86a

hg-log: Display the revision history with an ASCII graph.
$ hg log --graph
try on your machine

The command "hg log --graph" is used in the Mercurial version control system to display the commit history of a repository in a graphical representation.

When executed, the command generates a textual representation of branches and merges in the commit history, similar to a traditional graph. Each node in the graph represents a commit, and the arrows or lines connecting the nodes depict the relationships between the commits.

The "--graph" flag is added to the "hg log" command to enable graph mode. This flag instructs Mercurial to generate the graph representation of the commit history in addition to the regular log output.

By using "--graph," you can quickly visualize the branches, merges, and parallel development that have occurred in the repository, making it easier to understand the structure and relationships between different commits. This is particularly useful when dealing with complex project histories involving multiple branches and frequent merges.

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.
back to the hg tool