What is the Git Log (also known as commit history or commit log) ?

About

The commit log (log or commit hisotry) is a directed acyclique graph of commit.

Example of commit log:

         CA1--CA2--CA3 <-- Branch A (last commit CA3)
        /
 C1--C2--C3 <-- master (last commit C3)
        \
         CB1--CB2 <-- Branch B (last commit CB2)

Each leaf commit is a branch.

Each time a commit is performed a node in the log graph is added.

Snippet

Git has two visual log:

  • the log
  • and a short log

Last commit HEAD

The last commit of the current branch (the HEAD)

git log -n 1

Log

git log --format=fuller
git log --pretty=oneline

Shortlog

  • Commit by commiter
git shortlog -s -n 

Visual

Documentation / Reference


Powered by ComboStrap