tags:

views:

234

answers:

2

I just helped a friend to set up a Github account to collaborate on my project. His commits come through, but for some reason on the "Source" page of my repository next to his commit is only his name and not his username (with a link).

It seems strange, since Github obviously recognizes him (I added him to the list of collaborators etc.

Seems like a stupid question, but Google couldn't help.

Thanks!

A: 

Run this in Terminal:

  git config --global user.name "your-github-username"
  git config --global user.email "your-github-email"
Shaun
Please ignore this. You should never change your Git settings just because of where you happen to host your repository today. What happens if you decide tomorrow to host your repository on Gitorious or Assembla or Repo.Or.Cz or Codaset? Or you want to host it on multiple websites, for safety and redundancy? Instead of changing your Git settings to play nice with GitHub, you should change your GitHub settings to play nice with your Git settings.
Jörg W Mittag
Is the username/email attached to your commits going to be dramatically different if you're using different hosting providers?
mipadi
The username and e-mail address attached to a Git commit is exactly what you tell Git to.
Jörg W Mittag
Right, I'm just suggesting that there's nothing wrong with putting your name and email address in your global Git config, if that's what you typically use to "sign" your commits.
mipadi
+2  A: 

Does your friend have the e-mail address he is using for his commits correctly set up as an alias in GitHub? Otherwise, how is GitHub to know who he is? Git itself only records the full name and the e-mail address and obviously not the GitHub username, since you can use Git perfectly fine without GitHub.

Please note that StackOverflow is not the GitHub support forum. There are better places for questions like this, like, say, the GitHub support forum.

Jörg W Mittag
Thank you for the answer. But it seems to me that using that logic (StackOverflow is not the [whatever] support forum), 99% of StackOverflow would be gone.
Alexei Boronine