I upgraded SourceTree this morning and the problem started. The upgrade added:
[safe]
bareRepository = explicit
to ~/.gitconfig.
I removed it and Xcode worked again.
A bug has been filed with Atlassian. https://jira.atlassian.com/browse/SRCTREE-8176