You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d17e67b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+4-46Lines changed: 4 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ $ git-sim rebase main
90
90
91
91
By default, git-sim creates a web-first, shareable visualization that opens in your browser. It generates an interactive simulation of exactly how any Git command will impact your repo, without actually running the real Git command so nothing changes in your repo.
92
92
93
-
Run `git-sim -h` to list every command. Once git-sim is installed, `git sim <command>` works too, and `git-sim aliases` adds `git preflight` and `git live` (see [Terminal](https://github.com/initialcommit-com/git-sim#terminal)).
93
+
Run `git-sim -h` to list all commands.
94
94
95
95
**3. Watch your repo live:** a graph that follows your repo as it changes, and records every command you (or your agents) run
96
96
@@ -191,51 +191,9 @@ git-sim's pre-flight mode shows a deterministic evaluation of whether any Git co
191
191
192
192
This can be wired into AI agents to bring yourself (the human) into the loop to approve/deny Git commands that could be destructive. Run `git-sim wire-agents` to set up the automatic git-sim pre-flight for AI agents.
193
193
194
-
Git's own options pass straight through, and quoting the whole command works too (`git-sim preflight "git stash drop"`). `-C <path>` checks another repo, `--json` prints the report as JSON, and `--markdown` formats it for a pull request comment. The VS Code extension shows it in an editor tab.
194
+
Git's flags and options pass straight through, and quoting the whole command works: `git-sim preflight "git stash drop"`).
195
195
196
-
<details>
197
-
<summary>What pre-flight checks</summary>
198
-
199
-
-`reset`: the commits left behind and the uncommitted changes thrown away
200
-
-`clean`: the exact files it would delete (from `git clean -n`)
201
-
-`rebase`: the commits it replays, and whether any were already pushed
202
-
-`merge`: whether it fast-forwards, and whether it would conflict (from `git merge-tree`)
203
-
-`push`: whether a force-push would overwrite commits on the remote, and branches `push --delete` would remove
204
-
-`branch -d` and `-D`: commits not merged anywhere else
205
-
-`restore`, `checkout`, and `switch`: local changes they would throw away
206
-
-`stash drop` and `stash clear`: the stashed changes lost, including stashes from branches checked out in other worktrees
207
-
-`commit --amend`: whether the commit was already pushed
208
-
-`worktree remove` and `prune`: uncommitted changes deleted with the worktree, and stale records
209
-
-`rm`: uncommitted changes deleted with the file
210
-
-`reflog expire` and `delete`, `gc --prune`, and `filter-branch`
211
-
-`submodule deinit` and `update --force`: local changes inside the submodule
212
-
-`--abort`, `--continue`, `--skip`, and `--quit` for merges, rebases, cherry-picks, and reverts in progress
213
-
214
-
Commands that only read, or only add (`add`, `mv`, `init`, `clone`, `cherry-pick`, `revert`), are `safe`. `pull` is `safe` unless it's `pull --rebase` with local commits, which is `caution`. Commands pre-flight doesn't know are `caution`.
215
-
216
-
When a repo has more than one worktree, as with agents running in parallel, every report says which worktree the command runs in and checks what it could reach in the others: shared stashes, branches checked out elsewhere, and branches built on commits a rebase replays.
217
-
218
-
</details>
219
-
220
-
<details>
221
-
<summary>The text graph</summary>
222
-
223
-
Every report has a plain-text graph for places an image can't go, like a permission prompt, an SSH session, or CI logs. It's Git's own `log --graph` layout with a marker beside each commit the command affects, then the affected files:
224
-
225
-
```text
226
-
* c362a60 (HEAD -> mcp-server) Add Claude Code PreToolUse hook for autom... <- ABANDONED
227
-
* d31d48b Add MCP server with deterministic git pre-flight engine <- ABANDONED
228
-
* ccd3d99 (tag: v0.3.5, main) Bump version to 0.3.5 <- NEW HEAD
229
-
* 4f7c57e Update logo entry in manifest
230
-
... 212 earlier commit(s) not shown
231
-
232
-
Working tree:
233
-
modified README.md <- DISCARDED (not recoverable)
234
-
```
235
-
236
-
The markers are `ABANDONED` and `NEW HEAD` (reset), `REPLAYED (new hash)` and `NEW BASE` (rebase), `INCOMING` (merge), `PUSHED` and `OVERWRITTEN (remote only)` (push), `ABANDONED (branch deleted)` (`branch -D`), `REPLACED (new hash)` (`commit --amend`), and `SWITCH TARGET` (checkout and switch).
237
-
238
-
</details>
196
+
Format the report with `--json` or `--markdown` as needed.
239
197
240
198
## git-sim for agentic AI
241
199
@@ -319,7 +277,7 @@ Or in any client that supports stdio servers:
319
277
320
278
## Embed a graph in a web page
321
279
322
-
Embed a git-sim graph in any blog post, tutorial, or docs page, with the full interactive viewer. Save the graph as an SVG (or use **Download SVG** in any git-sim page's Share menu):
280
+
Embed a git-sim graph in any web page, blog post, tutorial, or docs, with the full interactive viewer. Save the graph as an SVG (or use **Download SVG** in any git-sim page's Share menu):
0 commit comments