This extension makes it possible to view the whole diff for working tree changes, staged changes, or a specific commit or stash (in GitLens commits/shashes lists).
The extension adds an icon to the "Staged Changes" and "Changes" groups which will open a diff that shows all the changes in a single diff file.
The same icon is also added to GitLens Commits, Stashes, and Branches lists, where it opens the diff for that commit, stash, or the whole branch (from the common ancestor with HEAD). It's also there when you compare two commits.
With an extension like Diff Viewer
, the diff looks like this:
There are also two new commands in the command pallette:
- Show whole diff of staged changes
- Show whole diff of working tree
You can add keyboard shortcuts to your liking for these commands.
This extension works best together with an extension that shows a diff file graphically; I use Diff Viewer by Guilherme Caponetto.
diffEditor.ignoreTrimWhitespace
is used to generate whitespace-ignoring diffs (withgit diff -b
)diffviewer.outputFormat
controls whether to show side-by-side or inline diffs
This extension has no settings of its own. Let me know if you want any settings; for example to hide the buttons in a context menu.
- The diffs don't automatically refresh when there are git or settings changes; you have to run the command or click the button again.
- The extension will misbehave (not find diffs) for branches that have
.
in the name.
See CHANGELOG.md