coo*_*ita 20 git xcode ios xcode7
每当我尝试提交时,在Xcode中使用源代码控制,我会收到一个错误,我需要配置我的电子邮件地址和名称(它似乎错误地读取了我的电子邮件地址).我去了航站楼,然后进入了他们(再次).错误没有消失.
我可以在终端正常提交,但不能在Xcode中提交.有办法解决吗?或者直接在Xcode中输入配置信息?
这是错误消息:
***请告诉我你是谁.
跑
Run Code Online (Sandbox Code Playgroud)git config --global user.email "you@example.com" git config --global user.name "Your Name"设置帐户的默认身份.
省略--global仅在此存储库中设置标识.致命:无法自动检测电子邮件地址(获得'myemail @ gmail-1040826.(无)')
这是我的.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
Run Code Online (Sandbox Code Playgroud)
coo*_*ita 18
看起来Xcode没有读取全局GIT设置.如果您遇到此问题,请通过终端设置您的姓名和电子邮件到特定项目:
git config user.email "you@example.com"
git config user.name "Your Name"
Run Code Online (Sandbox Code Playgroud)
注意:执行上述操作时,请确保您位于项目的目录中.
这不仅仅是全球环境中的问题,真正的问题是本地问题.
试试这个.
cd your/project/directory
git config --local user.email"your@email.com"
git config --local user.name"yourName"
这对我有用.
| 归档时间: |
|
| 查看次数: |
4185 次 |
| 最近记录: |