Created
July 16, 2022 18:21
-
-
Save bestknighter/2952d27e1b83753948ab5d1e71445658 to your computer and use it in GitHub Desktop.
Hack/Workaround to get a 3 way diff in vscode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if [ $# -ne 4 ]; then | |
echo "Usage: code3diff BASE REMOTE LOCAL MERGED" | |
exit -1 | |
fi | |
BASE=$1 | |
REMOTE=$2 | |
LOCAL=$3 | |
MERGED=$4 | |
code --diff "$BASE" "$REMOTE" | |
code --diff "$BASE" "$LOCAL" | |
code --diff "$BASE" "$MERGED" | |
code --diff "$REMOTE" "$LOCAL" | |
code --wait --diff "$LOCAL" "$MERGED" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment