Tools
Free & open sourcegit-sim
The visual layer for Git in your own repos: simulate, record, replay, audit and share Git command sequences - wherever you or your agents run them.
- Simulate any Git command before it runs, as an interactive graph you can step through.TerminalWebVS CodeJupyterVim / Neovim / EmacsGitHub PRs
- Track your repo live while recording every Git operation (human or agentic) as a visual command sequence you can replay.WebVS Code
- Catch and review potentially destructive Git commands from AI agents in real-time, before they harm your work.Claude CodeGitHub CopilotCursorCodexGemini CLI+ any MCP agent
- Share any git-sim output as a link, an embed, an image, a video, or a social post.Shareable linkHTML embedHTML pagePNGSVGMP4Social post
$ git-sim merge feature/pagination
(Or watch whole Git workflows play out step by step in the git-sim viewer)
How to use this page
- slider / ▶Drag the slider, or press play, to watch the command happen. Before and After jump to either end.
- ← → · spaceStep through a multi-step command; space toggles Before / After.
- APlay or pause the loop (the page opens playing). Any manual input takes over.
- hoverA commit shows its message, author, date and parents, with its history highlighted.
- clickCopies the commit sha.
- ctrl + wheelZoom around the cursor (pinch on a trackpad). Double-click resets the view.
- EscStop playback, reset the view, close this menu.
- shareThe Share button copies a link to this graph, copies it as an image, downloads PNG/SVG/page, or posts it. #before, #after or #step=N in the link pins the state.
Get more out of git-sim
Git and git-sim tips, straight to your inbox.
git-sim in place of git, and watch it play out on an interactive graph that simulates exactly what the command would do without impacting your repo.
git-sim rebase main
"What just happened?"
Live
Run git-sim live to record every Git operation executed by you or your AI agents in real-time, saving it as an interactive visualization you can replay and share.
git-sim live
"Is this safe?"
Pre-flight
Automatically monitor your Git repo to detect destructive operations run by you or your AI agents in real-time. You review the facts about how the command would impact your repo, and you decide whether to approve or deny.
git-sim preflight reset --hard HEAD~2
Already where you work
git-sim meets you wherever you or your agents use Git
git-sim instead of git to simulate any Git command directly in your repo.
WebEvery graph opens as an interactive web page you can step through and share as a link.
VS CodeBring all the power of git-sim directly into your favorite IDE.
Vim, Neovim, EmacsA plugin adds :GitSim commands (M-x git-sim-simulate in Emacs), so you can simulate, pre-flight or go live without leaving your editor.
JupyterDraw any Git command's graph right inside your notebook with %gitsim.
GitHub pull requestsAutomatically add git-sim visualizations to your GitHub pull request to illustrate what merging it would do.
HTML embedDrop an interactive git-sim graph into any web page with two lines of HTML.
AI agentsMonitor and visualize every Git command your agent runs against your repo on a live graph, and catch the risky ones before they cause harm.
What is git-sim?
git-sim is a free and open-source tool that allows you to visually simulate Git operations in your own local repos.
By default, git-sim creates an interactive web animation simulating the Git command in question, but you can choose from various shareable output formats including html embed, png, svg, and mp4.
git-sim is designed to work wherever and however you use Git in your development workflows. It can be run manually, or automated. Use it from the terminal, VS Code, Vim, Jupyter, or wire it into your agentic flows.
It can monitor and pre-flight risky Git commands, and record sequences of Git operations in real-time.
The release post has the longer story of how git-sim got started.
Simulate: "what would this do?"
Run any Git command with git-sim in place of git, and see exactly what it would do to your repo before you run it for real.
Pick a sample Git command to simulate on the graph:
Live: "what just happened?"
Run git-sim live to record every Git operation executed by you or your AI agents in real-time as an interactive session you can replay and share.
Pick a sample Git workflow to play:
Pre-flight: "is this safe?"
Before a Git command runs, git-sim automatically checks to determine how risky it is, exactly what you could lose, and how to undo it. Hook it into your AI agents to ensure their Git commands don't unintentionally break your repo.
Pick a sample Git command to pre‑flight:
Loading the pre-flight reports…
Make git-sim agentic with MCP and pre-flight hooks
git-sim integrates with your AI agents to simulate and pre-flight Git commands, putting control back in your hands.
git reset --hard in your Git repo.git-sim wire-agents
One command finds the AI agents on your machine and adds git-sim to each one's configuration: a pre-flight hook that checks every Git command before it runs, and an MCP server the agent can call to simulate or pre-flight a command itself.
Pre-flight hook and MCP server
MCP server
git-sim in your editor
The git-sim VS Code extension brings the power of git-sim directly into your code editor. Vim, Neovim, and Emacs are also supported.

git-sim already typed. Finish the command as you would in a terminal.

The extension works in VS Code, and in Cursor, Windsurf and VSCodium through Open VSX. With Copilot in agent mode, git-sim's pre-flight hook runs right inside the editor too. Install it in your editor.
Embed git-sim graphs in your web page
Writing about Git? Add two lines of HTML to embed git-sim graphs into any web page or blog, just like we did below:
<div class="git-sim" data-src="/img/merge.svg" data-title="git merge feature/pagination"></div>
<script src="https://initialcommit.com/js/tools/git-sim-embed.js" defer></script>
Share your simulations
Every git-sim graph has a button. Use it to copy a link, image, video, HTML page - and post it to your favorite socials.
A git-sim link carries the graph compressed in its #fragment, which browsers never send to the server.
Install and run
Python 3.10 or newer and Git, on Windows, macOS or Linux.
pip install git-simor pipx install git-sim, or uv tool install git-sim
git-sim instead of git, as follows:git-sim merge dev
git-sim reset HEAD^
git-sim rebase mainBy default, git-sim opens an interactive web graph showing you exactly how that Git command will impact your repo. Run git-sim -h to list all available commands.
git-sim preflight reset --hard HEAD~1 # how risky a command is, and what you could lose
git-sim live # a live graph that records your repo as it changes
git-sim wire-agents # add the pre-flight hook and MCP server to your AI agentscode --install-extension initialcommit.git-simOr search for git-sim in the Extensions view: in VS Code from the Marketplace, and in Cursor, Windsurf and VSCodium from Open VSX. The extension uses the git-sim installed in step 1. For Vim, Neovim and Emacs, the plugin is a single file you copy into your setup: see the Vim, Neovim and Emacs instructions.
Get more out of git-sim
Git and git-sim tips, straight to your inbox.
Supported commands
Every Git command git-sim can simulate, with flags that follow Git's own, and git-sim's own commands.
| Area | Commands |
|---|---|
| History and inspection | log, reflog, status, show, diff (including --staged), blame |
| Working tree and index | add, restore, rm, mv, clean, stash |
| Commits | commit (including --amend), revert, cherry-pick (ranges too) |
| Branches and tags | branch, checkout, switch, tag, worktree |
| Merging | merge, fast-forward or not, --no-ff and --squash, with conflict prediction |
| Rewriting history | rebase, rebase -i with a todo file, rebase --onto, reset in every mode |
| After a conflict | --continue and --abort for a merge, rebase or cherry-pick in progress |
| Finding a bug | bisect: start, good, bad, skip, reset |
| Remotes | clone, fetch, pull (including --rebase), push, remote, submodule |
| Setup | init, config |
| git-sim's own | preflight, live, wire-agents and unwire-agents (AI agents), aliases, media-dir |
Flags follow Git's own. The README lists every option per command.
Learn Git with git-sim
Hands-on Git lessons you work through in your browser, one small step at a time. Made with git-sim of course :)
FAQ
How can I see what a Git command will do before running it?
Run the same command with git-sim in place of git, for example git-sim rebase main instead of git rebase main. git-sim reads your local repository, simulates the command without touching it, and opens an interactive before / after graph of the result.
Does git-sim change my repository?
No. git-sim only reads the repository. Nothing is committed, moved or deleted; simulations and live sessions are written to your user cache folder, never inside the repository.
How do I install git-sim?
With Python 3.10 or newer and Git, on Windows, macOS or Linux: pip install git-sim (or pipx install git-sim, or uv tool install git-sim). Then run git-sim in any repository. git sim works too, since Git runs any git-<name> program, and git-sim aliases adds git preflight and git live.
Which Git commands can git-sim simulate?
add, bisect, blame, branch, checkout, cherry-pick, clean, clone, commit, config, diff, fetch, init, log, merge, mv, pull, push, rebase (including -i and --onto), reflog, remote, reset, restore, revert, rm, show, stash, status, submodule, switch, tag and worktree, with their common flags, and --continue and --abort for a merge, rebase or cherry-pick that stopped on a conflict.
What is the difference between simulate, pre-flight and live?
Simulate (git-sim <command>) shows what one command would do, as an interactive before / after graph. Pre-flight (git-sim preflight <command>) gives the facts about a risky command: how risky it is, what you would lose, and how to undo it. Live (git-sim live) follows your repository and plays every change as it happens, recording the session so you can replay it.
How does pre-flight decide whether a command is safe?
It works from your repository itself, using Git's own data and dry-run plumbing such as clean -n and merge-tree, never a guess. It finds which commits would become unreachable, which uncommitted changes would be discarded and whether they could be recovered, whether published history would be rewritten, and how to undo the command. A command that only adds to the repository is safe; one that can lose work is caution or destructive.
Can I watch what an AI agent does to my repository?
Yes. git-sim live follows the repository whoever is changing it, so every commit, branch, reset or rebase an agent runs plays on the graph as it happens and stays in the session. The pre-flight hook stops the destructive ones first.
Which AI agents does git-sim work with?
git-sim wire-agents finds the agents on your machine and configures each one. Claude Code, Codex CLI, Cursor, GitHub Copilot CLI, Gemini CLI and VS Code (Copilot) get the pre-flight hook and the MCP server; Windsurf, Cline, Roo Code, Amazon Q Developer CLI and Claude Desktop get the MCP server, which lets the agent simulate or pre-flight a command itself. git-sim unwire-agents takes it all out again.
Can I use git-sim in my editor?
Yes. The VS Code extension runs in VS Code, and in Cursor, Windsurf and VSCodium through Open VSX. Vim, Neovim and Emacs have plugins with the same commands, and in Jupyter the %gitsim magic draws the graph under the cell.
Can I share or embed a simulation?
Yes. Every graph has a Share button: a link that opens it in the git-sim viewer, an image (PNG or SVG), the self-contained HTML page, or a post. --img-format png writes an image from the terminal and --animate renders an MP4. Two lines of HTML embed an interactive graph in any web page.
Is my code uploaded when git-sim opens the viewer at initialcommit.com?
No. The graph travels inside the link's #fragment, which browsers never send to a server, and the link git-sim opens carries nothing else about you or your repository. Live mode works the same way: this site serves the page and the graphs come from a server on your own machine. Pass --open-in local to open the saved page directly instead.
Is git-sim free?
Yes. git-sim is free and open source under the GPL-2.0 license, and its code is on GitHub.
git-sim is free and open source, made by Initial Commit. Also from us: Devlands, where you learn Git by transforming your Git repository into a 3D game world you can literally walk through.