# Git Commit animated icon

> MIT-licensed Git Commit animated icon: plays once on hover. Use it in React or shadcn/ui, or get the Lottie JSON or SVG.

Git Commit is a 1.33 s micro animation from the development set that plays once on hover, like Git Branch and Git Merge. Hover-to-play icons typically liven up arrow links, feature lists, toolbar buttons and landing page cards.

## Facts

- Interaction: [Hover replay](https://useanimations.com/interactions/hover-replay). Plays once on mouseenter unless reduced motion is preferred. Leaving does not stop it; entering during playback does not restart it.
- Category: [Development](https://useanimations.com/categories/development)
- Duration: 1.33 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 3.1 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

- Lottie JSON: https://useanimations.com/icons/git-commit.json
- Static SVG (git-commit): https://useanimations.com/icons/git-commit/git-commit.svg
- ZIP (Lottie JSON and SVGs): https://useanimations.com/icons/git-commit.zip
- shadcn registry item: https://useanimations.com/r/git-commit.json
- Web page: https://useanimations.com/icons/git-commit

## React

```bash
npm install react-useanimations
```

```jsx
import UseAnimations from 'react-useanimations';
import gitCommit from 'react-useanimations/lib/gitCommit';

<UseAnimations animation={gitCommit} size={32} />
```

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/git-commit.json
```

```tsx
import { AnimatedGitCommit } from '@/components/animations/git-commit';

<AnimatedGitCommit size={24} />
```

## HTML and lottie-web

```html
<div id="git-commit-icon" style="width: 48px; height: 48px"></div>

<script src="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js"></script>
<script>
  const el = document.getElementById('git-commit-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/git-commit.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  el.addEventListener('mouseenter', () => { if (!motion.matches && a.isPaused) a.playSegments([0, a.totalFrames], true); });
</script>
```

## FAQ

### Why doesn't Git Commit restart on every mouse enter?

A run that has started plays its 1.33 s to the end, so moving in and out quickly doesn't make it stutter; the next enter after that plays it again. Keyboard focus plays it as well; a tap on a touch screen does not.

### Is Git Commit decorative?

By default it is aria-hidden. Pass aria-label="Git Commit" to announce it as an image, or leave it hidden when the link or button it sits in has its own text.

### Can Git Commit play on click instead?

Yes: pass interaction="click-replay". It then replays once from the start on every click unless reduced motion is preferred.

## Related icons

- [Git Branch](https://useanimations.com/icons/git-branch) (hover-replay)
- [Git Merge](https://useanimations.com/icons/git-merge) (hover-replay)
- [Git Pull Request](https://useanimations.com/icons/git-pull-request) (hover-replay)
- [Database](https://useanimations.com/icons/database) (hover-replay)
- [Command](https://useanimations.com/icons/command) (hover-replay)
- [Code](https://useanimations.com/icons/code) (hover-replay)
- [Server](https://useanimations.com/icons/server) (hover-replay)
- [Terminal](https://useanimations.com/icons/terminal) (loop)

[All development icons](https://useanimations.com/categories/development) · [All icons](https://useanimations.com/icons)
