How to use Visual Studio Code as mergetool and difftool in Git

Satria Janaka
Sep 1, 2021

--

Setup your config file in .git folder. Add this following script :

Test our git difftool

For example, I want to try to find a differences between remotes/origin/development and remotes/origingitlab/master in my working directory :

#in command prompt
> git difftool remotes/origin/development remotes/origingitlab/master

The terminal should prompted question Launch ‘vscode’ [Y/n]? for each file. For each file, press Y . After that, a Visual Studio code window should popped up.

--

--