Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Git Safety NetNew to Visual Studio Code? Get it now.
Git Safety Net

Git Safety Net

Abdulrhman Albrem

|
1 install
| (0) | Free
Pre-flight safety dialog, plain-language explanations, and one-click undo for dangerous Git operations.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git Safety Net

A VS Code extension that turns dangerous Git operations into a learning moment, not a panic moment.

When you trigger a destructive operation (currently: git push --force), Git Safety Net opens a pre-flight dialog that shows you — in plain language — exactly what is about to happen: which commits get deleted, which files change, who authored the commits being overwritten. It also creates an automatic snapshot so you can undo the operation if you change your mind.

The problem this solves

Mainstream Git GUIs handle destructive operations in one of two ways:

  • Hide them entirely (GitHub Desktop) — frustrating once you outgrow the safety wheels.
  • Show a generic "are you sure?" dialog (GitKraken, Sourcetree, VS Code built-in) — assumes you already know what you're doing.

Neither teaches. Both leave intermediate users exposed to history-rewriting catastrophes that are hard to undo and harder to explain to teammates.

What Git Safety Net does differently

  1. Plain-language pre-flight explanation — tells you specifically which commits and files will be affected, not just "are you sure?"
  2. Visual before / after of what changes on the remote — see the diff before you commit to it.
  3. One-click undo — every destructive op auto-creates a recoverable snapshot via git stash and the reflog.
  4. Contextual micro-lesson — explains why the operation is dangerous, with a "don't show again" graduation path once you've learned.

Status

Early prototype. Currently supports: safe force push.

Planned next: git reset --hard, branch deletion, interactive rebase.

Development

npm install
npm run compile

Then press F5 in VS Code to launch an Extension Development Host with the extension loaded.

Origin

Designed from HCI principles studied in CIT3407 (Human-Computer Interaction). The feature set is the practical realization of the "Contextual Onboarding Widgets for Git Operations" idea from the course's GitHub UI analysis assignment.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft