Warning
Create a Time Machine backup before major updates, disk operations, or security changes on macOS.
What you will achieve
Required foundation for developers and many CLI tools on macOS.
1) Install via GUI prompt
xcode-select --install
2) Verify compiler and git availability
xcode-select -p
clang --version
git --version
3) Accept licence if prompted
sudo xcodebuild -license accept