Using Visual Studio Code (version 1.11.2), I can see a side-by-side graphical diff of my current changes very easily by clicking the Source Control button in the left p
From Using Version Control in Visual Studio Code:
Add this to the Git configuration file, like ~/.gitconfig
:
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
When using git difftool HEAD HEAD^
, Git will ask if to use Visual Studio Code.
It doesn't use Visual Studio Code, but if you just want to see a quick summary of changes... just start a PR from the branch on GitHub.
I use GitLens extension as well. Go to Source Control
tab, right click on file you want to compare with origin/master
(or other) branch. From the menu choose Open Changes with...
and pick a branch.
You can use an extension for this.
Two good options:
Gitlens: https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
With this one, you can use the >GitLens: Open Changes with...
action to compare with any branch (local or remote).
You also can use Git History: https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
You can see the entire file history and compare with the current version with the >Git: View File History
action.
From MSDN blog
Viewing Diffs
Our Git tooling supports viewing of Diffs within VS Code. Click the file in the Git view to display a side-by-side view. This allows you to compare your current file with a previous version of it: