git: error: SDK “macosx” cannot be located

Just updated my machine to Yosemite. I’m getting this error from Git now:

git: error: SDK "macosx" cannot be located

I’m able to run git status with no issue, but anything like git add seems to work, but then throws this error. Command Line Tools are installed, I tried reinstalling Git.

  • Access different branches during a git merge conflict
  • Some Files Disappeared After Git Stash
  • Why is git showing text file as binary file?
  • LibGit2Sharp throws an exception while committing changes
  • Finding all files touched by a particular author in git history?
  • eslint pre-commiot on git
  • What does git blame do?
  • Changing your online repositiory from another computer
  • Create a git repository that contains another git repository
  • list all files having a git attribute set
  • Switching branches without touching the working tree?
  • Push more than one netbeans project in one repository
  • One Solution collect form web for “git: error: SDK “macosx” cannot be located”

    Not sure exactly what, but something got out of whack during the upgrade. Uninstall CommandLineTools by typing sudo rm -r /Library/Developer/CommandLineTools then reinstall. I just typed some git command like: git status and let the OS prompt me to install the CommandLineTools. Everything is happy now.

    Git Baby is a git and github fan, let's start git clone.