Show the diff between two files with VSCode from the command-line

SEPTEMBER 21, 2022

Let's create two files with incremental content.

echo "Hello," > a
echo "Hello, Nono\!" > b

Then show their diff in Visual Studio Code.

code --diff a b

A VSCode window comparing the two files we created will open.