开发者

Xcode not allows me to create local git

开发者 https://www.devze.com 2023-02-19 05:45 出处:网络
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 g

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:

Xcode not allows me to create local git


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消