Change the username for Git in Xcode?

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.

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.

Answers


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.


The following terminal commands works for me:

xcrun git config --global user.name 'new_user_name'
xcrun git config --global user.email 'new@email.com'

These are to update user name and e-mail respectively.

After execution of that commands successive commits to Git via Xcode will use the data specified in it.


Need Your Help

Blurry Buttons on Retina Displays

css button retina-display

This question concerns a free site template I'm building, which you can demo here and see the code for here.

Linq to Sql query, datediff +-3 days

c# asp.net entity-framework linq-to-sql

I'm working with a flights page. Right now I got some flights in my database and I want to display them.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.