172

In TortoiseGit, gitk or on BitBucket, it is common to have a visualization of the project history with all the branches, like this:

enter image description here

However, GutHub's commit history seems to be flat, at least I couldn't find a way to display this kind of graph. Can the GitHub's web UI somehow visualize branches like other Git clients commonly can?

Borek Bernard
  • 50,745
  • 59
  • 165
  • 240
  • 2
    Edit: GitHub has since restored the service. `/network` behaves as expected. As of 2019-May-01: Network graph deprecated. No information given in the changelog. No replacement offered. Update: GitHub changelog no longer contains entry for deprecating the feature, but the feature still does not work. – DrNerdfighter May 01 '19 at 19:59

2 Answers2

208

You can see a graph, but without commit messages in Insights => Network section (commit messages with authors are shown on hover).

Note: this works for public repos or GitHub Enterprise only!

Example: https://github.com/google/orbit/network Network grap

genericUser
  • 4,417
  • 1
  • 28
  • 73
Ruslan Ostafiichuk
  • 4,422
  • 6
  • 30
  • 35
  • 21
    Note that the Network tab is currently placed under the Graphs tab within the GitHub UI – jeyoor Dec 02 '15 at 17:27
  • 1
    Note this shows both forks and branches in those forks. If there are too many of them, it refuses to display them at all, for instance with https://github.com/python/cpython/network – Jeroen Wiert Pluimers Jul 07 '17 at 06:46
  • 6
    As a shortcut, just add `/network` in the url after your repo name – Slartibartfast Oct 24 '17 at 03:26
  • 4
    Note that it is now under the `Insights` tab – qwertzguy Mar 28 '18 at 22:34
  • 1
    On a private repository, adding `/network` to the URL shows "Forks" and tells me that no one has forked the repository yet. But I don't care about forks. I just want to see the different branches, development paths, and merges. How can I do that in GitHub? – Garret Wilson Mar 08 '19 at 01:02
  • @GarretWilson that's a limitation of private non-Pro github repos. You still can see the branches in bitbucket private repos. – Ruslan Ostafiichuk Mar 10 '19 at 19:49
  • 6
    @RuslanOstafiichuk thank you, but that sure is a letdown for teaching my software development class. We had been using Bitbucket, which has a decent graph to show students how Git works. We're switching to GitHub, but now my students won't be able to see a graph of their repository unless they make their homework public, which for obvious reasons I don't want them to do. – Garret Wilson Mar 10 '19 at 19:58
  • 6
    Github removed this feature today. This is no longer possible. – killjoy May 01 '19 at 18:49
  • 1
    @killjoy link from the answer is still working https://github.com/dart-lang/stagehand/network – Ruslan Ostafiichuk May 02 '19 at 19:04
  • 3
    Looks like they undid the changes. The blog post that announced the removal is gone now. – killjoy May 03 '19 at 17:40
  • 14
    this only works for public repos or having GitHub Enterprise! – Lotan Nov 20 '20 at 21:26
16

You could use Le Git Graph, a browser extension that does exactly this.

Screenshot

Install the extension from here : https://chrome.google.com/webstore/detail/le-git-graph-commits-grap/joggkdfebigddmaagckekihhfncdobff

It will add a new "commits" section to every GitHub repo you open. Open the commits graph and there, all commits across branches will be listed along with the git graph.

Screenshot 2

Hope it helps!

Nirmal Scaria
  • 318
  • 3
  • 6
  • The extension _Le Git Graph_ has a beautiful look, and gives exactly what is needed. Unfortunately I do not see it fit for private repositories. For public repositories it should work great, even though I have not tested it. If it had been rewritten to accept a personal access token (PAT) (e.g. the same way as [Refined GitHub](https://github.com/refined-github/refined-github) does), a fine-grained token could have been supplied, but authenticate directly (through your server) as a user is unfortunately a big no-go for me. – Frode Evensen Jan 23 '23 at 07:37
  • Feature request for Le Git Graph: https://github.com/NirmalScaria/le-git-graph/issues/33 – Frode Evensen Jan 23 '23 at 07:37