Skip to content

Instantly share code, notes, and snippets.

@lucasbracher
Created July 1, 2025 13:33
Show Gist options
  • Select an option

  • Save lucasbracher/9fc4cbbc81dad6c304d07bd9ee450e2b to your computer and use it in GitHub Desktop.

Select an option

Save lucasbracher/9fc4cbbc81dad6c304d07bd9ee450e2b to your computer and use it in GitHub Desktop.
Ohmyzsh plugin for using meld as git diff without making it the default
gitmeld() {
FILENAME=$1
HASH_1=$2
HASH_2={3:HEAD}
meld --label="$HASH_2 $(basename $FILENAME)" --label="$HASH_1 $(basename $FILENAME)" <(git show $HASH_2:$FILENAME) <(git show $HASH_1:$FILENAME)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment