I've been using windows for software development. I'm not aware of MacOS internals. I'm aware that Xcode software is used to develop iOS/Mac apps but I don't need it.
For my usecase, I was able to install intellij, Java, Docker, Minikube & Visual-Studio-Code on my Intel Mac with BigSur... I'm able to run simple micro-service with working DB in local in docker container.
But when I try to use Git I'm getting this issue:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I think this is related to Xcode. I didn't want to touch it,
so I tried to install Git by brew.
brew install git
but got error
Error: git 2.29.2 is already installed
So I tried to do update
brew upgrade git
but again got the below error again.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I also tried to remove Git to do a clean install
brew remove git
and there was no error, but then I installed git with brew again and the same error.
Is there a way to install Git without having Xcode ? I dont want to install unnecessary software on my machine, things which I don't need.