简体   繁体   English

升级到xcode 4.6-本地Git不再可用

[英]Upgraded to xcode 4.6 - Local Git not available anymore

xCode upgrade blues. xCode升级蓝调。 The upgrade went fine and smooth except for Git. 除了Git之外,升级进行得很顺利。 When I try to commit, I get this message: 当我尝试提交时,收到以下消息:

"The repository "project name" could not be reached. Please verify that the repository is online and reachable and try again." “无法访问存储库“项目名称”。请验证存储库是否联机且可访问,然后重试。”

Here are some data points: 以下是一些数据点:
1. I am running Mac OS X Lion 10.7.5 (11G63) 1.我正在运行Mac OS X Lion 10.7.5(11G63)
2. I downloaded xCode 4.6 from the file download list (versus app store) - just in case this is related to some keychain developer account or something 2.我从文件下载列表(相对于应用商店)下载了xCode 4.6-以防万一这与某个钥匙串开发人员帐户或某些内容有关
3. I have been using a local git. 3.我一直在使用本地git。
4. The project name in the repository is now red after the xcode upgrade 4. xcode升级后,资源库中的项目名称现在为红色
5. I can see everything on xcode repository except the branches, I don't even see "master". 5.我可以看到xcode存储库上除分支之外的所有内容,甚至看不到“ master”。 I also cannot add any branches (and obviously can't commit) 我也不能添加任何分支(显然不能提交)
6. I checked on terminal and my git is fine and I can see all the branches as well: command is "git branch" 6.我在终端上检查了一下,我的git很好,我也可以看到所有分支:命令是“ git branch”
7. I tried the usual restart xCode/reboot with no avail. 7.我尝试了通常的重新启动xCode / reboot,但无济于事。

Thanks 谢谢

After hours of headache, I found the problem: 经过数小时的头痛之后,我发现了问题所在:

In the directory chain to the repository, one of my folders had a name that contained a "/" forward slash: 在存储库的目录链中,我的一个文件夹的名称包含一个“ /”正斜杠:

/Users/username/Desktop/.../directorynamewithforwardslash/project directory / Users /用户名/Desktop/.../directorynamewithforwardslash/项目目录

That seems to have tripped the reestablishing of the gits after an xCode upgrade. 在xCode升级之后,这似乎阻碍了gits的重新建立。

I changed the dir name (removed the "/") and it worked. 我更改了目录名称(删除了“ /”),它可以正常工作。 I hope this helps someone. 我希望这可以帮助别人。

thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM