git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RFC: Very useful script to SVG graph the git commits from a file orientated view

From
John Tapsell <johnflux@gmail.com>
Date
Apr 4, 2013, 12:36 UTC
Message-ID
<CAHQ6N+qLbrBKWhq8OGKco+JxiiLVOQvW09j3rLeZw265POZuMw@mail.gmail.com>
Hi,
  I made this script to help me see the logical connections between
commits.  It produces a .svg graph showing the commits that affected a
file.
For example, say you have the commits:

commit1 - modify hello.c commit2 - modify goodbye.c commit3 - modify hello.c and goodbye.c

It will draw a graph showing the first two commits as siblings, and commit3 as a child of commit1 and commit2.

I have found this very useful when squashing and rebasing development branches that have got a lot of "fix typo" and "fix" type commit messages. From the graph you can quickly see which commit they were fixing (the parent, in the graph).

Here is an example output, running it on kwin for the last 100 commits:
$ graph_git.pl --nofiles -100
http://imagebin.org/252754
And again with files for the last 10 commits:
$ graph_git.pl -10
http://imagebin.org/252756
(Note that it has tooltips)
JohnFlux
Next: Jeremy Rosen
Message 1 of 4 in “RFC: Very useful script to SVG graph the git commits from a file orientated view”
  1. John TapsellApr 4, 2013
  2. Jeremy RosenApr 4, 2013
  3. John TapsellApr 4, 2013
  4. Jeremy RosenApr 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.