加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – Git Commit适用于XCode beta,但不适用于普通版本

发布时间:2020-12-15 01:42:53 所属栏目:百科 来源:网络整理
导读:我有源控制与Xcode 7.0 beta 5一起使用,但是当我尝试在我新安装的Xcode 7.0 GM中执行提交时,它将无法工作. (新的Xcode 7.0 GM已经取代了我以前的Xcode 6.4版本,它从未使用Source Control.)我收到错误消息工作副本“APP NAME”无法提交文件,如下图所示: 这个
我有源控制与Xcode 7.0 beta 5一起使用,但是当我尝试在我新安装的Xcode 7.0 GM中执行提交时,它将无法工作. (新的Xcode 7.0 GM已经取代了我以前的Xcode 6.4版本,它从未使用Source Control.)我收到错误消息工作副本“APP NAME”无法提交文件,如下图所示:

enter image description here

这个问题类似于

> XCode Won’t Commit To GIT
> Xcode and Git Source Control : “The working copy XXXXX failed to commit files”

但是对于我来说它确实在beta Xcode版本中工作,而不是在标准版本中.

我尝试按照this answer运行建议的命令行命令,但没有明显的区别.似乎必须有一些我可以编辑或替换的文件,但我不知道它在哪里.我的两个Xcode版本都使用相同的项目文件夹.

更新

在项目目录中键入git config –list我得到以下内容(电子邮件已更改,但更正):

user.email=my_correct_email@mymail.com
user.name=Suragch
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.MongolAppDevelopment-iOS.url=https://github.com/suragch/MongolAppDevelopment-iOS.git
remote.MongolAppDevelopment-iOS.fetch=+refs/heads/*:refs/remotes/MongolAppDevelopment-iOS/*
branch.master.remote=MongolAppDevelopment-iOS
branch.master.merge=refs/heads/master

同样,我可以在标准Xcode中对项目进行编辑,但为了更新git,我必须回到Xcode测试版.

解决方法

git config –list为您提供本地和全局(和系统)git配置.

检查user.name是否仍在本地repo中注册:git config –local -l

如果没有,可能是XCode7 beta考虑了不同的$HOME,而你的命令行使用普通的HOME(你有一个.gitconfig,你的user.name和user.email)

只需尝试在您的仓库中设置它们:

cd /path/to/rpeo
git config user.name Suragch
git config user.email my_correct_email@mymail.com

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读