Git

Git: git log --oneline --graph --decorate -20 — Linux

Show a compact graph of recent commits.

Availability: Tool and version dependent; install separately where required.中文

Syntax

git log --oneline --graph --decorate -20

Examples

Show a compact graph of recent commits.

git log --oneline --graph --decorate -20

Parameters, options and clauses

Option / clauseDescription
--onelineShow each commit on one compact line.
--graphDraw the commit ancestry graph.
--decorateShow branch and tag names.
-n <count>Limit the number of commits shown.
--since=<date> / --author=<pattern>Filter commits by date or author.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory