ios - Xcode 7 Git 安装失败 : unable to auto-detect email address

标签 ios xcode git version-control git-config

在 Xcode 7 上为新项目启用 Git Repository Source Control 时,显示:

enter image description here

但是,即使我在终端中设置了 user.name 和 user.email 之后:

git config --global  user.name "John"
git config --global  user.email "john@example.com"

我从终端使用检查并查看

 git config --global -l

结果显示:enter image description here

我还检查了项目文件夹中的本地配置,使用:

 git config --local -l

user.name 和 user.email 未在本地设置。

但我仍然无法提交,并且 pop 来自 Xcode 的相同消息。 任何想法出了什么问题?请帮忙!

最佳答案

找到解决方案:

  1. 进入项目文件夹,寻找./git 目录
  2. 用文本编辑器打开文件“config”。
  3. 终端 git config 命令似乎没有正确应用到这个配置文件。它是这样的: enter image description here
  4. 我把它改成了 enter image description here 并保存。
  5. promise ,一切正常!

旁注:关于如何在项目目录中找到 stash 的 .git。 Xcode 5 - remove source control for project Show hidden file in Mac

关于ios - Xcode 7 Git 安装失败 : unable to auto-detect email address,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32745039/

相关文章:

ios - 在 Swift 框架中打包 XIB 进行分发?

iOS IPA 重新打包/重新签名 App Store 应用程序

ios - GIT:如何从工作目录中 check out 所有文件?

git - .gitignore 排除包含文件的文件夹但包含子目录

ios - 如何使用自动布局在 MKAnnotation 中显示多行?

ios - React Native 共享扩展 - 访问 AsyncStorage?

ios - OneSignal 上的关键警报支持不起作用

Iphone 应用程序存档 - 没有这样的文件或目录

ios - 解析目标 - C 到 Swift iOS

git - LF 将在 git 中被 CRLF 替换 - 文件将具有其原始行结尾