Michael Paquier - PostgreSQL committer

  • Home
  • Manuals
  • Presentations
  • Projects
  • Resume
  • Tags
  • About

Graphs in GIT

You liked this post or you have a comment? Contact information is available here and sponsoring is here.
05 Sep 2011
Tags: configure, git, graph, log

In library git-core, git has a command that makes all the commits appearing in graphs. For example:

git log --graph --all

It is an other matter to make readable graphs. For that purpose, the following command is helpful to setup a special alias:

git config alias.graph "log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short"

This makes tags and branch names appear in green.

For a command without colors:

git config alias.graph "log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short"

Then this command based on the alias above prints nice-looking graphs.

git graph

Search

Social

Github

Mastodon

Twitter

RSS Feeds

Main

Postgres

Sponsor

Unless otherwise specified, the contents of this website are (C)Copyright Michael Paquier 2010-2023 and are licensed for use under CC BY-SA 3.0.