explaingit

initialcommit-com/git-sim

4,660PythonAudience · developerComplexity · 2/5Setup · moderate

TLDR

A command-line tool that shows what a Git command will do to your repository as a visual diagram or animated video before you run it, helping you safely preview operations like rebase, reset, or merge.

Mindmap

mindmap
  root((git-sim))
    What it does
      Preview Git commands
      Static image output
      Animated video output
    Supported commands
      merge rebase reset
      cherry-pick stash
      commit branch
    Tools included
      git-sim main tool
      git-dummy fake repos
    Tech
      Python Manim
      MP4 WebM output
    Use cases
      Safe Git exploration
      Teaching Git
      Documentation
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Preview what git rebase or git reset would do to your branches before running the real command and risking data loss.

USE CASE 2

Generate animated video explanations of Git operations for team documentation or teaching purposes.

USE CASE 3

Create a fake practice repository with git-dummy and safely experiment with different Git commands without risk.

Tech stack

PythonManim

Getting it running

Difficulty · moderate Time to first run · 30min

Requires installing Manim and its OS-level dependencies before git-sim, a Docker install is available to skip this step.

In plain English

Git-sim is a command-line tool that produces visual diagrams showing what a Git command would do to your repository before you actually run it. Git is the version control system that developers use to track changes to code, and its commands can be difficult to reason about, especially operations like rebase or reset that rewrite history. Git-sim shows you the result as a picture or animated video, so you can see the effect without risk. You run it from the terminal inside any existing Git repository. The syntax mirrors Git's own commands: instead of typing "git merge my-branch" you type "git-sim merge my-branch" and a diagram appears. By default it produces a static image in JPG or PNG format. With an optional flag it produces an animated MP4 or WebM video showing the operation step by step. Supported commands include add, branch, checkout, cherry-pick, commit, fetch, log, merge, pull, push, rebase, reset, restore, revert, stash, and others. The tool is built on top of Manim, an animation library originally created for making math explanation videos. This means the setup has more steps than a typical pip install: you need to install Manim and its system-level dependencies first, which vary by operating system, before installing git-sim itself. Instructions in the README cover Windows, macOS, and Linux. Docker installation is also available if you want to avoid the dependency setup. A companion tool called git-dummy is bundled alongside it. Git-dummy creates a fake Git repository with a specified number of branches and commits, which you can then use as a sandbox for trying out git-sim visualizations without touching a real codebase. The project is open source and free. The README notes the maintainer is now working on a separate follow-on project called Devlands that extends these ideas further. Git-sim requires Python 3.7 or newer and is installed via pip.

Copy-paste prompts

Prompt 1
How do I install git-sim on macOS including its Manim dependency and run my first git-sim merge preview?
Prompt 2
Show me how to use git-sim to generate an animated MP4 video of a git rebase operation on my current branch.
Prompt 3
How do I use git-dummy to create a fake Git repository with multiple branches to test git-sim visualizations?
Prompt 4
How do I run git-sim using Docker to avoid installing Manim and its system dependencies manually?
Open on GitHub → Explain another repo

← initialcommit-com on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.