Change the username for Git in Xcode?

前端 未结 4 1481
[愿得一人]
[愿得一人] 2021-01-31 11:11

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 commi

4条回答
  •  醉梦人生
    2021-01-31 11:55

    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).

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


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

    Using xcrun before the git config commands allows to locate or invoke coexistence- and platform-aware developer tools from the command-line.
    (assuming the Xcode Command-line Tools is up-to-date)

提交回复
热议问题