Doing a Diff in Visual Studio Code

I’ve been using Visual Studio (VS) Code more and more for items that don’t require the full Visual Studio experience (and when I’m not on a Windows machine).

The latest find that VS Code supports is doing a simple diff of two files.

All you have to do is open a command or terminal window and type the following:

code –diff <file1> <file2>

When you press enter, VS Code will open and show the diff of the two files like this:

After that, you can make any modifications you need to.