Leave PR-style review notes on your own local commits and uncommitted changes, before anything is pushed.
Diff Notes adds comment boxes to VS Code's normal diff editor. Notes are stored inside your repository (in .git/diff-notes/), never in your working files, and never leave your machine.
Quick start
Open a folder that is a Git repository.
Click the Diff Notes icon in the activity bar.
In Commits, open an unpushed commit (or the uncommitted changes) and open a file's diff.
Click the + next to a line (or select several lines), write your note, and press Add Note.
Use the Comments view to see all notes, jump to them, resolve them, or copy them.
Features
Notes on diffs. Comment on single lines or ranges in commit diffs and in the uncommitted-changes diff. Reply, edit, resolve and reopen. Note text supports markdown.
Commits and Comments views. Commits lists your unpushed commits and uncommitted changes with note counts. Comments lists every note and can show open notes only or resolved ones too.
Group by. Group the Comments view by commit, by file, or not at all.
Pushed and outdated tracking. Notes on commits that have since been pushed move to a Pushed section. Notes whose lines changed move to Outdated, and you can open the current diff from them.
Rename following. If a commented file is renamed, its notes follow it.
Previous / next note. Step through notes in a diff with the title-bar buttons or Alt+P / Alt+N.
Copy as markdown. Copy all notes, or one group or note, as markdown, ready to paste into a PR description, chat or an AI assistant.
Delete and auto-clear. Delete single notes, or clear all resolved, pushed or outdated notes at once. Optionally delete notes automatically some days after their commit is pushed.
Settings
Setting
Default
Description
diffNotes.autoClearPushedDays
0
Automatically delete notes on pushed commits this many days after the commit was first seen as pushed. 0 turns it off.
Known limitations
Notes become Outdated when lines inside their range change.
Pressing Esc does not close a comment box (a VS Code issue). Use Cancel.
In workspaces with several Git repositories, only the first one is used.
The uncommitted-changes diff is read-only; you can't edit in place.
If several unpushed commits match a note's code, the note may attach to the wrong one (the newest wins).
An unsaved draft note has no gutter marker until it is saved, and empty drafts may stay until their diff tab is closed.
When copying as markdown, the code block language is guessed from the file extension.