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

Ricardo Jesus Jarquin Perez picture Ricardo Jesus Jarquin Perez · Jul 13, 2018 · Viewed 71.1k times · Source

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

Answer

Ratan Uday Kumar picture Ratan Uday Kumar · Jul 13, 2018

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.