Xcode 7 GM无法提交(GIT)

编程入门 行业动态 更新时间:2024-10-10 14:23:47
本文介绍了Xcode 7 GM无法提交(GIT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

无论何时我尝试提交,在Xcode中使用源代码控制,我都会遇到一个错误,我需要配置我的电子邮件地址和名称(它似乎读取的电子邮件地址不正确)。我去了码头,然后再次进入他们。错误没有消失。

Whenever I try to commit, using source control in Xcode, I get an error that I need to configure my email address and name (it seems to read my email address incorrectly). I went to the Terminal, and entered them (again). The error didn't go away.

我可以在终端中正常提交,但不能在Xcode中提交。有没有办法解决它?或者在Xcode中直接输入配置信息?

I can commit normally in Terminal, but not in Xcode. Is there a way to fix it? Or enter the configuration info directly in Xcode?

这是错误信息:

This is the error message:

***请告诉我你是谁。

*** Please tell me who you are.

运行

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

来设置您的账户的默认身份。 Omit --global仅在此存储库中设置身份。

to set your account's default identity. Omit --global to set the identity only in this repository.

致命:无法自动检测电子邮件地址(获得'myemail @ gmail-1040826。(none)')

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

这里是我的.gitconfig(为了保护隐私,我用我的名字取代了我的实际名称,而我的用户名用myname取代):

Here's my .gitconfig (I replaced my actual name with "My Name", and my username with "myname" for privacy reasons):

myname-1040826:Project myname$ git config -l user.email=myname@gmail 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=github/jpsim/PeerKit.git

推荐答案

它看起来像Xcode不读全局GIT设置。如果您遇到此问题,请通过终端将您的姓名和电子邮件设置为特定项目:

It looks like Xcode is not reading global GIT settings. If you encounter this issue, set your name and email to the specific project via the Terminal:

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

注意:确保您在项目目录中进行上述操作。

Note: Make sure you are in the project's directory when you do the above.

更多推荐

Xcode 7 GM无法提交(GIT)

本文发布于:2023-11-26 10:34:35,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Xcode   GM   GIT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!