Git branch icon

Added in v0.1.0

A free pencil-style git branch icon, drawn by code from 1 line, 2 circles and 1 curve. Use it as an SVG, a React component, or by name. MIT licensed.

git-branch

01Use it

Use git-branch

One package, four ways in. The icon inherits currentColor and is decorative unless you give it a title. Install it with npm i @matita/icons.

React

import { GitBranch } from '@matita/icons/react';

<GitBranch size={24} />

// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="git-branch" />

JavaScript

import { GitBranch, toSvg } from '@matita/icons';

toSvg(GitBranch, { size: 24 });   // SVG string

SVG

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" overflow="visible" class="sketch-icon sketch-icon-git-branch" data-sketch="" aria-hidden="true"><path d="M6.49 3.04Q6.05 9.23 6.37 15.41" stroke-width="1.728"/><path d="M8.64 19.24C8.55 19.38 8.31 19.86 8.05 20.08C7.79 20.29 7.41 20.46 7.07 20.53C6.73 20.6 6.34 20.55 5.99 20.48C5.63 20.42 5.25 20.34 4.95 20.16C4.64 19.98 4.36 19.7 4.15 19.41C3.94 19.12 3.74 18.77 3.67 18.41C3.6 18.06 3.65 17.66 3.74 17.3C3.83 16.95 4 16.58 4.22 16.28C4.44 15.97 4.74 15.67 5.07 15.47C5.41 15.27 5.83 15.15 6.23 15.1C6.63 15.05 7.08 15.05 7.47 15.16C7.86 15.27 8.27 15.49 8.57 15.75C8.88 16.01 9.12 16.37 9.31 16.74C9.5 17.1 9.68 17.51 9.7 17.91C9.73 18.31 9.63 18.76 9.47 19.15C9.32 19.53 9.09 19.92 8.79 20.23C8.5 20.53 7.89 20.84 7.71 20.96" stroke-width="1.808"/><path d="M18.06 4.03C18.2 4.09 18.67 4.18 18.94 4.34C19.21 4.49 19.48 4.71 19.66 4.96C19.83 5.21 19.89 5.55 19.97 5.85C20.06 6.15 20.17 6.47 20.15 6.78C20.14 7.08 20.03 7.42 19.9 7.7C19.76 7.99 19.56 8.27 19.34 8.5C19.11 8.74 18.84 8.98 18.54 9.11C18.24 9.24 17.87 9.27 17.53 9.29C17.19 9.3 16.82 9.32 16.49 9.22C16.17 9.13 15.85 8.92 15.58 8.7C15.31 8.48 15.06 8.2 14.88 7.89C14.71 7.59 14.56 7.23 14.51 6.88C14.46 6.54 14.51 6.16 14.58 5.81C14.65 5.45 14.74 5.07 14.93 4.76C15.12 4.45 15.41 4.17 15.71 3.95C16.01 3.73 16.37 3.54 16.73 3.43C17.09 3.33 17.5 3.29 17.88 3.32C18.26 3.35 18.83 3.57 19.02 3.62" stroke-width="1.68"/><path d="M17.55 8.48Q17.45 15.9 8.88 17.4" stroke-width="1.536"/></svg>

Pencil variant

import '@matita/icons/pencil.css';
import { GitBranch } from '@matita/icons/react';

<GitBranch size={32} pencil />

The file is icons/git-branch.svg in the package (pencil/git-branch.svg for the pencil variant). Matita 0.7.0.

02How it's drawn

The recipe for git-branch

Git branch is not stored as a drawing. It is a recipe of 1 line, 2 circles and 1 curve on a 24 by 24 grid, and a small program draws it like a pencil would. The wobble comes from the name, so it always comes out the same.

A · Recipe
L 6.5 3.5 6.5 15;
C 6.5 18 2.5;
C 17.5 6.5 2.5;
Q 17.5 9 17.5 16 9.2 17.5
B · Plotted
C · Drawn
How it works

03Takes, sizes, pencil

Same icon, every way

Pass a seed for another take of the same recipe. The wobble is capped, so it still reads at 16 px.

seed 0
seed 1
seed 2
seed 3
seed 4

Five seeds of git-branch. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

git-branch from exact shapes (wobble 0) to the full hand (wobble 1, the default). The exact version is also a ready-made file: exact/git-branch.svg.

16 px
20 px
24 px
32 px
48 px
96 px

True pixel sizes.

Ink
Pencil