as git mergetool
Don't like using VSCode merge conflicts resolution? Try WebStorm's instead.
or any other Jetbrains IDE. If you don't want to buy Webstorm's licence try PyCharm Community Edition instead.
Open your Jetbrains Toolkit and enable generation of shell scripts. Provided the folder that exists in your $PATH. I've used /usr/local/bin.
Open ~/.gitconfig file (it should be in your home directory) in your favourite editor and add this configuration
[merge]
tool = webstorm
[diff]
tool = webstorm
[mergetool]
keepBackup = false
[mergetool "webstorm"]
cmd = webstorm merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" && read
[difftool "webstorm"]
cmd = webstorm diff $LOCAL $REMOTE --wait
trustExitCode = trueThis will use WebStorm as your default mergetool and difftool.
Note: If you're using different Jetbrains IDE use it's name instead of
webstorm. For example, for PyCharm:[merge] tool = pycharm [mergetool "pycharm"] cmd = pycharm merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" && read
The
keepBackup = falsewill disable git creating*.origfiles when performing merge
When you encounter merge conflicts just run git mergetool to open up WebStorm. Don't worry it won't open the entire IDE, just the merge conflict resolution tool.
To speed up the startup time of WebStorm keep it open in the backgroud. You don't need to open any project.
After you've resolved the conflicts press Enter in the commandline. WebStorm will open for each conflicting file.
Wait! Why doesn't VSCode have this feature? Well... there's been a proposal from 2017, but since then VSCode team have removed this feature from the roadmap


