This week my dev productivity dropped for a day. And I hated it.
Two of my favourite plugins for Sublime Text are GitGutter and SublimeGit. The former lets me see what I’ve changed in the current branch easily, and the latter lets me easily check in code, run “blame”, etc.
They suddenly stopped working. I had no idea why. GitGutter stopped showing anything, and SublimeGit told me I wasn’t even in a folder managed by git.
Yet command line git worked just fine. Infuriating.
I re-installed both. No joy.
I re-installed SublimeText. No joy.
I downgraded from Sublime Text 3 (beta) to v2. No joy.
I was seriously tearing my hair out.
I finally came across the solution and reason purely by accident. I had to upgrade a module that required a compiler and it failed because I had a new version of xcode and the command line tools – they needed me to accept the license via the command:
sudo xcodebuild -license
Once run, that fixed GitGutter and SublimeGit.
The reason? I had git from homebrew installed. The plugins in Sublime Text used the OS X version of git instead, which wouldn’t run without accepting the license.
I’m not sure this is entirely OK. Should I have to accept a license for non-Apple software when re-installing the command line tools? It seems wrong to me. Thoughts?