Skip to content

Instantly share code, notes, and snippets.

@xavierchia
Forked from kylefox/gist:4512777
Last active March 1, 2023 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xavierchia/b7b983ca0f8f1270165d9242f21d034b to your computer and use it in GitHub Desktop.
Save xavierchia/b7b983ca0f8f1270165d9242f21d034b to your computer and use it in GitHub Desktop.
If you want to use Xcode's FileMerge as your git mergetool, this is how you set it up.
# 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
# Then, when git tells you that there is a conflict, you can run `git mergetool` and
# it will open XCode's mergetool (like in the question's screenshot) and you can work through the conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment