4

In tig, I find it often hard to find out which commit belongs to which branch. In gitk, this is much more easier. I think this is because of two things. Firstly, gitk colors the branches differently (I mean the lines between commits) and secondly, it seems that the commits are sometimes place in a different "columns" (see pictures, btw git log --graph draws branches like tig).

Is there a way to color the blue stars or the pink lines drawn for each branch?

Gitk

Tig

Rolf
  • 1,129
  • 11
  • 27

1 Answers1

5

Yes, tig shows the branch lines with different colors since version 2.0. Due to limitations in how lines can be drawn using text, a commit graph rendered in tig is often less compact than gitk. Compared to tig, gitk also uses other ways to reduce the "horizontal" width of the commit graph such as simply hiding branch lines in parts of the graph when they have no commits.

The color of the commit "nodes" can be configured in tigrc by setting the graph-commit color. Example:

color graph-commit green default

example of colored commit graph

Jonas Fonseca
  • 1,811
  • 15
  • 15
  • Yes, looks great! I actually meant that the commit node color would be different foreach branch (as far as possible). tig2.0 for the win! Do you know why the columns are different (compared to gitk)? – Rolf Jun 26 '14 at 14:42
  • Tig uses a different drawing algorithm and I think that gitk uses `--topo-order` by default where tig uses the same order as `git-log`. – Jonas Fonseca Jul 23 '14 at 01:51