LinuxCommandLibrary

hg-log

displays repository commit history

TLDR

Show commit history

$ hg log
copy
Show last n commits
$ hg log -l [5]
copy
Show specific file history
$ hg log [file]
copy
Show with patch
$ hg log -p
copy
Graph view
$ hg log -G
copy
Show specific revision
$ hg log -r [revision]
copy

SYNOPSIS

hg log [options] [file]

DESCRIPTION

hg log displays repository commit history. It shows changesets with author, date, summary, and other metadata.
The command supports filtering by file, branch, or revision range. Graph mode visualizes branch and merge structure.

PARAMETERS

FILE

Limit to specific file.
-l, --limit N
Limit number of entries.
-r, --rev REV
Show specific revision.
-p, --patch
Show patches.
-G, --graph
Show DAG graph.
-b, --branch BRANCH
Show branch commits.
--template TPL
Output template.
--help
Display help information.

CAVEATS

Large histories can be slow. Use -l to limit. Templates for custom output.

HISTORY

Log is a core Mercurial command for viewing repository history since version 1.0.

SEE ALSO

hg(1), hg-status(1), hg-diff(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community