Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you set both your username and real name in GIT?

Tags:

git

When I log into bitbucket I can set my username, first name, and last name. Does Git have all these options or just the username?

like image 670
Evanss Avatar asked Jan 20 '26 15:01

Evanss


2 Answers

Nope. See the list of options in the docs, specifically the ones prefixed with user.

user.email
Your email address to be recorded in any newly created commits. Can be overridden by the GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL, and EMAIL environment variables. See git-commit-tree[1].

user.name
Your full name to be recorded in any newly created commits. Can be overridden by the GIT_AUTHOR_NAME and GIT_COMMITTER_NAME environment variables. See git-commit-tree[1].

user.signingKey
If git-tag[1] or git-commit[1] is not selecting the key you want it to automatically when creating a signed tag or commit, you can override the default selection with this variable. This option is passed unchanged to gpg’s --local-user parameter, so you may specify a key using any method that gpg supports.

You can only set one name.

like image 184
Tim Avatar answered Jan 23 '26 03:01

Tim


It has username and email.

Tip: You don't have to use your real name--any name works. Git actually associates commits by email address; the username is only used for identification.

You can look here and here for more information.

like image 31
Roman Kotenko Avatar answered Jan 23 '26 05:01

Roman Kotenko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!