Skip to content

Instantly share code, notes, and snippets.

@treyharris
Created February 1, 2018 19:26
Show Gist options
  • Save treyharris/620f9b50b2ad6bd16e8d771856388d09 to your computer and use it in GitHub Desktop.
Save treyharris/620f9b50b2ad6bd16e8d771856388d09 to your computer and use it in GitHub Desktop.
#!/bin/bash
dir=$PWD
until [ -e "$dir/.git" ]; do
if [ "$dir" == "/" ]; then
echo "This isn't a git working dir" >&2
exit 1;
fi
dir=`dirname "$dir"`
done
open -a FileMerge -n -W --args -left "$1" -right "$2" -merge "$dir"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment