Skip to content

Instantly share code, notes, and snippets.

@briangordon
Created March 28, 2019 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briangordon/2ea67986e81a16c480f33dd7b7e690c8 to your computer and use it in GitHub Desktop.
Save briangordon/2ea67986e81a16c480f33dd7b7e690c8 to your computer and use it in GitHub Desktop.
gitgraphjs.com (https://web.archive.org/web/20181222070223/http://gitgraphjs.com/) gives you the building blocks to start working with the JS version but leaves you to put it together. Here's a fully working example to get it running.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/domready/1.0.8/ready.js"></script>
<script type="text/javascript">
domready(function() {
var gitgraph = new GitGraph({
template: "blackarrow",
mode: "compact"
});
var develop = gitgraph.branch("develop");
develop.commit();
});
</script>
</head>
<body>
<canvas id="gitGraph"></canvas>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment