Opus Motion ★ Star on GitHub

Data · git-branch-graph

Git branch graph

A git history graph from commit data: dots appear in order along a time axis, branches take coloured lanes, edges draw on, a merge commit joins two lanes, tags flag a commit, a HEAD pill travels to the newest commit and a caption shows its message.

A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Git branch graph: three frames of the animated chart, start, middle and end
Git branch graph — start, middle and end of the 8.0-second motion.

What Git branch graph is for

Explaining branching and merging, release flow, pull-request workflows, version-control tutorials, "how our team ships" and developer-tool promos.

  • git
  • branch
  • merge
  • commit
  • version control
  • github
  • developer
  • release
  • pull request
  • graph
  • software
  • devops
  • workflow
  • code

Details

Category
Animated charts & data visualisation
Length
8.0 s (240 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title
Colour props
colors background ink accent
Mood
hud, editorial
Roles
subject

Use Git branch graph in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add git-branch-graph --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render git-branch-graph --props '{"title":"Branch, build, merge","colors":["#4C8DFF","#F5A524","#2EC4A6","#C77DFF","#FF6B8B","#8BD450"],"background":"#0C0F16","ink":"#EAEFF8","accent":"#FF5C7A"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export git-branch-graph --as webm-alpha --props '{"title":"Branch, build, merge","colors":["#4C8DFF","#F5A524","#2EC4A6","#C77DFF","#FF6B8B","#8BD450"],"background":"#0C0F16","ink":"#EAEFF8","accent":"#FF5C7A"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="git-branch-graph"
  props={{
    title: 'Branch, build, merge',
    colors: ['#4C8DFF', '#F5A524', '#2EC4A6', '#C77DFF', '#FF6B8B', '#8BD450'],
    background: '#0C0F16',
    ink: '#EAEFF8',
    accent: '#FF5C7A',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="git-branch-graph"
  props='{"title":"Branch, build, merge","colors":["#4C8DFF","#F5A524","#2EC4A6","#C77DFF","#FF6B8B","#8BD450"],"background":"#0C0F16","ink":"#EAEFF8","accent":"#FF5C7A"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "git-branch-graph",
      "props": {
        "title": "Branch, build, merge",
        "colors": [
          "#4C8DFF",
          "#F5A524",
          "#2EC4A6",
          "#C77DFF",
          "#FF6B8B",
          "#8BD450"
        ],
        "background": "#0C0F16",
        "ink": "#EAEFF8",
        "accent": "#FF5C7A"
      }
    }
  ]
}

Git branch graph props

12 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
commits[{"id":"a1f3c9e","message":"Initial commit","branch":"main"},{"id":"b72d41a","message":…commits oldest → newest [{id, message, branch, parents?: ids (default: previous commit on the same branch; list 2 ids for a merge), tag?}]
colors["#4C8DFF","#F5A524","#2EC4A6","#C77DFF","#FF6B8B","#8BD450"]lane colours, one per branch in order of first appearance
title"Branch, build, merge"heading (empty = none)
headLabel"HEAD"text of the pointer on the newest commit
showMessagestrueshow the newest commit message as a caption
every15frames between commits
speed1timing multiplier
startAt0frame the graph starts
background"#0C0F16"page colour or 'transparent'
ink"#EAEFF8"text / HEAD colour
accent"#FF5C7A"tag colour
fontFamily""monospace font override (empty = JetBrains Mono)

Notes & credits

Technique sources:

  • original (generic developer explainer)