gitvisual-studio-codegit-diffgit-difftool

How can I see 'git diff' on the Visual Studio Code side-by-side file?


I would like to know how to see as a file with the command git diff master origin/master in the terminal on Visual Studio Code.

I did a git fetch from my remote repository, and now I want to see the diff, but with the command just show me in the terminal.

Example of what I want:

Screenshot of diff viewer in Visual Studio Code


Solution

  • In Visual Studio Code, on the left side, there is a Git icon that looks like this:

    By clicking on this icon, then double-clicking one of the files listed under Changes you can see the Git difference in two sides.