-
-
Save kylefox/4512777 to your computer and use it in GitHub Desktop.
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff |
@kylefox, I actually have a binary existing at /usr/bin/opendiff
already, which is not a symlink, and last modified date shows it to be physically older than the version at /Applications/Xcode.app/Contents/Developer/usr/bin/opendiff
. So using the git line that you have, seems that would find the version that is specified at /usr/bin/opendiff
, rather than the xcode version, right? Or does the app itself then refer back to Xcode for the proper location to open?
@intel352 per the opendiff
man page:
opendiff is a command line utility that provides a convenient way to launch the FileMerge application from Terminal to graphically compare files or directories. If FileMerge is already running, opendiff will connect to that running instance for the new comparison. opendiff exits immediately after the comparison request has been sent to FileMerge.
thx
phew. thanks. vimdiff was killing me.
Am I correct that I still have to open the tool manually by typing "git mergetool" after a merge conflict? Or should this happen automatically?
You are correct KokoDoko.
thank you. exactly what i was looking for
Fantastic, thank you!
π
I also ran this, so after saving changes and exiting, git wouldn't ask "Was the merge successful? [y/n]?"
git config --global mergetool.opendiff.trustExitCode true
π
thank you ππ»
π Still useful 10 years on
π Thanks for this.
thanks
π