Added Collaborator with commits not showing as Contributor #23379
-
TL;DR
I have a GitHub repository created by me, which was private until now. To allow my friend to commit to it, I had added him as Collaborator (in the “Manage Access” section). After getting access to the then private repository he committed several times. But, his name never got into the contributors. It felt maybe, of the repository being private. But now when the repository is turned public, his name is yet not included in the contributors. Note: Both of us are relatively new to GitHub. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
I’ve had a look - I can see that there is one contributor on one of your repositories who may have their email address stored with a typo in their git config settings. This would lead to their commits not appearing to come from their account, and therefore not listed as a contributor. Your friend can check quickly by using this command:
If it is wrong, this guide may help: docs.github.comSetting your commit email address - GitHub Docs |
Beta Was this translation helpful? Give feedback.
-
Thanks, indeed this was the issue. But, I wonder when someone is providing their GitHub credentials accurately why do GitHub specifically need the email address. Isn’t the GitHub credentials meant to act as an alternative to an email address for GitHub related tasks? |
Beta Was this translation helpful? Give feedback.
-
0deadLock0:
This is a general Git thing, not only for Github. Git records author information in the commit itself. For a bit more detail on that, see: git-scm.comGit - Viewing the Commit HistoryIt is possible (common, even) that people push commits they didn’t author, e.g. after merging code someone else contributed. Github cannot just ascribe commits to whoever pushes them, so they use the author information in the commits, which is meant for exactly that purpose. If you (or your friend) want to keep your email address private, Github lets you use a special (not working for mail) address connected to your account. See the documentation About commit email addresses for how to do that. |
Beta Was this translation helpful? Give feedback.
-
airtower-luna:
I found out that private emails are not shown in contributors (at least that happens with my account), so better to hold email public |
Beta Was this translation helpful? Give feedback.
-
I have a question instead. I collaborated on a project with a friend. After pushing my side of the project, she no longer can see her commits and my GitHub account name alone is visible though the repo is in her GitHub account. What can we do to rectify the issue? We are both new to GitHub |
Beta Was this translation helpful? Give feedback.
I’ve had a look - I can see that there is one contributor on one of your repositories who may have their email address stored with a typo in their git config settings. This would lead to their commits not appearing to come from their account, and therefore not listed as a contributor.
Your friend can check quickly by using this command:
If it is wrong, this guide may help:
docs.github.com
Setting your commit email address - GitHub Docs
//docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address