在Xcode中更改Git的用户名? [英] Change the username for Git in Xcode?

查看:517
本文介绍了在Xcode中更改Git的用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法改变Xcode的Git用户名和电子邮件地址?当我尝试提交时,它会发布我的真实姓名。我希望它发布我的GitHub用户名,以便您可以将提交链接到GitHub上的用户。

Is there any way to change the Git username and email for Xcode? When I try commit now it will post my real name. I want it to post my GitHub username so that you can link commits to my user on GitHub.

通常在Git中,我只能键入 git config --global user.name whoosh 在终端中,但它似乎不适用于Mac和Xcode。

Usually with Git I've been able to just type git config --global user.name whoosh in the terminal but it doesn't seem to work on Mac and Xcode.

推荐答案

正如 Xcode 4中设置的Git提交信息在哪里?,XCode从您的联系人卡片中从您的(2012) 地址簿

As mentioned in "Where is the Git commit info set in Xcode 4?", XCode takes user information from your contact card from your (2012) Address Book (called Contact in 2014).

更改您的帐户在2014年6月12日联系人卡片会改变用户信息(fo r new 提交)

Changing your contact card would change user information (for new commits)

2014年更新(2年后),如 sergtk 回答 ,XCode(5+)现在支持git config user.name user.email

Update 2014 (2 years later), as illustrated in sergtk's answer, XCode (5+) now supports the git config user.name and user.email.

这篇关于在Xcode中更改Git的用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆