Git Blame.
Every commit counts. Who wrote this line, when, and why. Before you finish asking.
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.
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.
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.
| The field | Git Blame | |
|---|---|---|
| Blame inline, in the status bar and on hoverany mix, on the left or the right | Some | |
| A heatmap of every line's age | Some | |
| Tick marks on every line of the active commit | Rarely | |
| A blame cache on disk that improves over time | Rarely | |
| Built for massive repos and remote work over SSH | Some | |
| Diffs every file in a commit from one double-click | Rarely | |
| Blames files outside the workspace | Rarely | |
| Opens any file on the web as it was at a commit | Some | |
| An API other extensions can call | Rarely | |
| Free, with no account or sign-in | Some |
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 history
Git Blame: Search - Mark a spot
Git Blame: Checkpoints - Run your own
Git Blame: Scripts - Inline on or off
Toggle inline blame - Tick marks on or off
Toggle commit highlight - Cache on or off
Toggle blame disk cache
Settings
- Inline blame
showBlameInline - Left or right
inlineBlame.position - Status bar
showStatusBar - Tick marks
commitHighlight - Tick mark color
commitHighlightColor - Ignore whitespace
ignoreWhitespace
API
- Commit for this line
getShaForCurrentLine - Every commit in a file
getAllShasForFile - All commits
getAllCommits - Log for a line
logForLine - When the line's commit changes
onShaForCurrentLine - Commits, line by line
onShaListingIndexedByLine
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.