Git

Making Git History Feel More Like MediaWiki in VS Code

If you have ever used MediaWiki, you know how clean and intuitive the revision history is. Every time you hit save, the wiki creates a new revision you can easily step back to. Git in VS Code has some of this power, but it works differently. In Git, only commits are revisions, not every file save. That means you cannot just save and expect to be able to roll back unless you commit. Let us talk about how to make Git feel a little more like MediaWiki inside VS Code.

Why saves are not revisions in Git

When you save a file in VS Code, you are only updating it on disk. Git does not notice that change until you stage and commit it. That is why the history in Git looks sparse compared to a wiki. The idea behind Git is that revisions are intentional points you want to track, not every single edit. This is great for clean project history, but it can feel limiting when you are used to a wiki-style workflow.

Using commits like wiki saves

The closest way to get a wiki-like history is to commit early and often. Think of commits as your “save revisions.” Run:

git add -A && git commit -m "wip: updated feature"

Later you can clean things up with an interactive rebase:

git rebase -i HEAD~10

This keeps your history usable for reverting, while giving you the flexibility to tidy it when you are ready.

Extensions that give you snapshots

You can get closer to MediaWiki’s experience with extensions in VS Code.

  • Local History: creates a snapshot of the file each time you save. You can restore those snapshots even without a Git commit.
  • Timeline view: built into VS Code. Right-click a file, choose “Open Timeline,” and you will see Git commits and sometimes local saves, depending on your setup.

GitLens and Git Graph for clear history

If you want the history to feel intuitive, GitLens is excellent. It gives you file history, line-by-line history, and the ability to restore specific versions. Git Graph gives you a visual map of commits and makes actions like revert or checkout easier. Together, they bring the clarity you expect from a wiki’s history page.

Practical ways to revert

If you need to roll back:

  • Restore a file from an old commit:
    git restore --source=HEAD~3 path/to/file
  • Explore an older state:
    git switch --detach <commit>
  • Undo a commit safely:
    git revert <commit>
  • Reset the whole branch (use carefully):
    git reset --hard <commit>

Or you can right-click in GitLens or Git Graph to handle most of these without touching the command line.

Building your setup

Here is a good balance:

  1. Turn on auto save in VS Code so Local History can capture snapshots.
  2. Install GitLens for rich history.
  3. Use Git Graph for a visual branch view.
  4. Make small descriptive commits often, and squash them later if you want a tidy main branch.

Closing thoughts

MediaWiki and Git are built for different purposes, but you can blend the strengths of both. With Local History for per-save snapshots and GitLens for powerful file history, you can make VS Code feel much closer to that wiki-style clarity while still enjoying the power of Git. The key is to treat commits as intentional revisions, and let extensions give you the safety net of snapshots on every save.