Full name on contributors list in repository

First of all, please bear with me as I’m just starting to use GitHub now

So I’m trying to upload source code into a repository however the website shows my full name (since it’s on my computer). I’m not on a full-name basis with the people I’m sending my code to so two questions; Firstly would it only be visible to me as the owner of the repository? And if not then how can I censor it? (Where it shows it https://prnt.sc/t795ic)

Also if I’m doing this wrong, please tell me. I’m just trying to learn how to use this site. Thanks a bunch

The screenshot looks like the name is one GitHub got from the commit log. When you make a git commit, git includes an author name and email address in the commit. This will be visible to anyone who clones the repository, so if your repository is public it’s effectively public, even though in the web interface GitHub replaces the name with the username if the mail address belongs to a user account.

You can set the name and email address to use using the user.name and user user.email options, for example if you’d like to use a nickname for the current repository only (add --global to make it the default for all your repositories):

git config user.name "Your Nickname"

GitHub also offers a way to hide you mail address while keeping commits associated with your account, see the documentation on commit email addresses.

However, your full name is already part of existing history of your repository. If you want to get rid of that you will have to rewrite the history to change author information.

This worked! Thank you

(Also the repository was private)

1 Like