Is there a way to see git diff from origin/master using Visual Studio Code?
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.
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.