Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
729 views
in Technique[技术] by (71.8m points)

git - How to use opendiff as default mergetool

Hi I am trying to use opendiff as the git mergetool, but when I run mergetool I get this error message:

The merge tool opendiff is not available as 'opendiff'

What am I doing wrong? It was working fine before, but since I installed a new harddrive it's not working anymore :(

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You'll need to configure opendiff as your global merge.tool:

# locate xcode utilities
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

# set "opendiff" as the default mergetool globally
git config --global merge.tool opendiff

If you get Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo, opening XCode and accepting the license fixes the issue


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...