ios – Xcode 7 GM无法提交(GIT)

前端之家收集整理的这篇文章主要介绍了ios – Xcode 7 GM无法提交(GIT)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
每当我尝试提交,在Xcode中使用源代码控制,我得到一个错误,我需要配置我的电子邮件地址和名称(似乎读取我的电子邮件地址不正确)。我去了航站楼,再次进入(再次)。错误没有消失。

我可以在Terminal中正常提交,但不能在Xcode中。有办法解决吗?还是直接在Xcode中输入配置信息?

这是错误信息:

*** Please tell me who you are.

Run

06000

to set your account’s default identity.
Omit –global to set the identity only in this repository.

fatal: unable to auto-detect email address (got
‘myemail@gmail-1040826.(none)’)

这是我的.gitconfig(我的名字替换了我的名字,我的用户名为“myname”,为隐私)

myname-1040826:Project myname$ git config -l
user.email=myname@gmail.com
user.name=My Name
filter.media.clean=git-media-clean %f
filter.media.smudge=git-media-smudge %f
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
submodule.PeerKit.url=https://github.com/jpsim/PeerKit.git

解决方法

看起来Xcode没有读取全局GIT设置。如果您遇到此问题,请通过终端将您的姓名和电子邮件地址发送到具体项目:

git config user.email "you@example.com" 
git config user.name "Your Name"

注意:当您执行上述操作时,请确保您在项目的目录中。

猜你在找的Xcode相关文章