Error: could not find the "git" utility, not the developer tool or PATH

I upgraded the version of Xcode to 7.3.1. When I use ' git status ', I find an error! in the following way:

 $git status sh: line 1: 1601 Segmentation fault: 11 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find git 2> /dev/null git: error: unable to find utility "git", not a developer tool or in PATH 

Thank you for your promotion!

+6
source share
3 answers

The best solution would be to download and install - even if you assume that it is already installed: https://git-scm.com/download/mac

+3
source

I had the same problem - I left the bash session (closed the terminal) and started a new one and it fixed it.

+17
source

This happened with the upgrade to High Sierra and Xcode to 9. This sequence fixed it.

 xcode-select --install sudo xcode-select -s /Library/Developer/CommandLineTools 

Found this answer at https://davidwalsh.name/fix-git-high-sierra-upgrade (article and comments).

+4
source

All Articles