---
title: "Git compare animated icon"
description: "Git compare animated icon (Developer & version control). Two branches are compared, each route reaching across to the other. Light: the top branch's route pulls back toward its commit, which swells as it gathers it, then draws out again down and across; its arrowhead rides in on the tip, lands with a hit, thrusts toward the other branch, recoils and settles; the bottom branch answers a beat later the opposite way, up and across. Strong: both commits gather longer, the routes shoot out faster and the arrowheads thrust further and settle in two beats. The commits never shrink."
canonical: https://generativeicons.com/icons/git-compare/
---

# Git compare animated icon

Two branches are compared, each route reaching across to the other. Light: the top branch's route pulls back toward its commit, which swells as it gathers it, then draws out again down and across; its arrowhead rides in on the tip, lands with a hit, thrusts toward the other branch, recoils and settles; the bottom branch answers a beat later the opposite way, up and across. Strong: both commits gather longer, the routes shoot out faster and the arrowheads thrust further and settle in two beats. The commits never shrink.

- Id: `git-compare`
- Category: Developer & version control
- Search terms: compare branches, compare commits, branch diff, diff branches, branch comparison, ahead behind, diverged branches, compare refs, ahead of main
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/git-compare.lottie (dotLottie, 4620 bytes, sha256 3680438c5d24e961aaeb1380bde6133be637a10df764eae8a680cb06e80dc100)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add git-compare
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/git-compare.mjs';

export function GitCompareIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/git-compare.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/git-compare/ · https://generativeicons.com/api/icons/git-compare
