If you do not have Xcode installed but do have the Command Line Tools, you will find the vulnerable git /Library/Developer/CommandLineTools/usr/bin/git
so the command would be:
sudo chmod -x /Library/Developer/CommandLineTools/usr/bin/git