So I'm trying to create a new project and I want to create a local Git repository for it. I'm using Xcode 4; I just downloaded and installed the latest version. When I go to make a new project and get to the point where I need to enter a name for my project the "Create local git repository" checkbox it is grayed out. I have a开发者_Go百科lready tried to create a symlink to where Xcode thinks Git should be with this command:
sudo ln -s /usr/local/git/bin/git /usr/bin/git
Here is a screenshot:
It's because there is already a git repository in disk folder (It's written in your screenshot). If it's created by mistake, remove it (.git
folder in .
or ..
) and try again. Note that you don't need to provide your own git executable - Xcode4 has it.
You just overwrite Xcode’s copy of git, which I can only assume is not a recommended thing to do. Reinstate it with this:
sudo ln -f /usr/libexec/git-core/git /usr/bin/git
And as mspasov said, it’s because there is already a git repository.
精彩评论