Archive for the 'Tips and Tricks' Category

Github trick – associate commits with your user account

On Github, in order to have your commits associated with your github user account, the email address you use when pushing code to the origin must match an email address associated with your github account. This is something I discovered after noticing that my commits were showing up as grey and not blue on the activity bar.

Setting your git email account is really easy. There are two different ways of doing it. First, you can directly edit your .git/config file and add a section like this:

[user]
	email = you@example.com
	name = Your Name

The second method is by using the following command from the root folder of your project:

git config user.name "Your Name"
git config user.email "you@example.com"