An extension for Visual Studio Code

Git Blame.

Every commit counts. Who wrote this line, when, and why. Before you finish asking.

Free · No account · VS Code and Open VSX · Works over SSH

Huge repos.
Far-off machines.
No waiting.

Blame in a monorepo over SSH usually means a spinner. Git Blame keeps a cache on disk that gets faster the more you use it, so the files you come back to answer right away.

Blame from scratch, every time
Blaming
Every open walks the history again. Across a network, every open pays for it.
Git Blame, with its disk cache
Ready.
Instant on the files you've seen, and the cache keeps learning. Switch it off any time with one command.
518K+downloads across the VS Code Marketplace and Open VSX
3 waysto see blame: inline, in the status bar, on hover. Pick any mix.
8 viewsin its own sidebar: Diff, Line, Branch, Log, File, Search, Explorer, Stash
Heatmaps

Hot code.
Cold code.

Every line wears its age: blue for the old guard, red for this week's work. Drag back through the commits and watch the file put itself together.

parser.ts— c0ffee
Blade#20 · 1998-08-19 · Handle empty input
Hover

Hover.
Then go deeper.

Point at the blame and the commit opens up: the whole message, the patch, the line's history. One more click and the file is on the web, exactly as it was.

 

Git archaeology,
at scale.

One sidebar, a lot of shovels. Here are a few. The rest, you'll dig up.

Tick marks

Every line the active commit touched gets a mark in the margin, so you see the whole change at a glance. Pick your own color.

Time machine

Step a line back through the patches that shaped it, one commit at a time.

Every file in a commit

Double-click the status bar blame to diff every file the commit changed, with a file menu to jump between them.

Search history

Search commits and changes, or search interactively as you type.

Any file, anywhere

Blame any file open in the editor, not just the ones in your workspace.

Checkpoints

Mark where you are, keep working, and come back to compare.

An API

Other extensions can ask for the commit behind any line, or every commit behind a file.

And then some

Stats, scripts, branches, stashes, the reflog. We'd rather you find the rest yourself.

Every row.

Git Blame next to blame extensions in general, one box at a time.

Git Blame compared with blame extensions in general
The fieldGit Blame
Blame inline, in the status bar and on hoverany mix, on the left or the rightSome
A heatmap of every line's ageSome
Tick marks on every line of the active commitRarely
A blame cache on disk that improves over timeRarely
Built for massive repos and remote work over SSHSome
Diffs every file in a commit from one double-clickRarely
Blames files outside the workspaceRarely
Opens any file on the web as it was at a commitSome
An API other extensions can callRarely
Free, with no account or sign-inSome

Compared with VS Code blame extensions in general, not any one extension. "Some" and "Rarely" describe how common each is across the field. Features vary by extension, version and plan. Download count combines the VS Code Marketplace and Open VSX.

Make it yours.

Left by popular demand. Right too. Everything has a switch, and the commands are a keystroke away in the Command Palette.

Commands

  • Search historyGit Blame: Search
  • Mark a spotGit Blame: Checkpoints
  • Run your ownGit Blame: Scripts
  • Inline on or offToggle inline blame
  • Tick marks on or offToggle commit highlight
  • Cache on or offToggle blame disk cache

Settings

  • Inline blameshowBlameInline
  • Left or rightinlineBlame.position
  • Status barshowStatusBar
  • Tick markscommitHighlight
  • Tick mark colorcommitHighlightColor
  • Ignore whitespaceignoreWhitespace

API

  • Commit for this linegetShaForCurrentLine
  • Every commit in a filegetAllShasForFile
  • All commitsgetAllCommits
  • Log for a linelogForLine
  • When the line's commit changesonShaForCurrentLine
  • Commits, line by lineonShaListingIndexedByLine

Fair questions.

Is it really free?

Yes. Free on the Visual Studio Code Marketplace and on Open VSX. No account, no sign-in, no tier to upgrade to.

Does it work over SSH?

That's where it shines. Git Blame was built for massive repos and remote development. Its disk cache makes blame instant on the files you return to, and it gets better the longer you use it.

Which editors does it run in?

Visual Studio Code 1.107 or later, and editors that install extensions from Open VSX, such as VSCodium.

Inline blame is too much. Can I turn it off?

Yes. Run Git Blame: Toggle inline blame, or keep just the status bar, or just hover. Inline blame can also sit on the left of your code instead of the right.

Where does "Open online" go?

To your repository's web host, at the exact commit. Set git-blame.gitWebUrl, or drop a .gitblame file in your repo. The documentation has the details.

Can I read the code?

Yes. The published extension is minified for speed, and the unminified source is there for anyone who wants to read it.

Read between
the lines.

Every line has a story. Somebody wrote it on purpose. Go ask.

Free · No account · Visual Studio Marketplace · VS Code 1.107 or later