Accounts and profile
Intermediate GitLab UI
Why this matters
Two small settings decide whether GitLab treats your work as yours: the email address in your commits and the one verified on your account. Get them aligned once and every commit you ever make is attributed correctly. Get them wrong and your history shows a grey avatar and an unlinked name, which is confusing for everyone reading it later.
gitlab.com or your company's GitLab
GitLab comes in two forms, and which one you use changes the URL and almost nothing else:
| gitlab.com (SaaS) | Self-managed | |
|---|---|---|
| URL | gitlab.com |
your company's, for example gitlab.company.com |
| Sign-in | email and password, or a provider such as Google | often your company account through single sign-on |
| Version | always current | whatever your administrators installed; may lag by months |
| Who administers it | GitLab | your IT team |
This course describes gitlab.com. On a self-managed instance the URLs differ, some features may be absent on your licence tier, and a few menus may be older. Everything about Git is identical.
Creating the account
- Go to your GitLab and select Register (or sign in with the provider your company uses).
- Choose a username. It becomes part of your URL (
gitlab.com/your-username) and is hard to change later, so pick something you would put on a business card. - Confirm the verification email.
- Enable two-factor authentication as soon as you have signed in, and save the recovery codes somewhere other than your phone (lesson 8.5).
The email question
Your commits carry whatever user.email says on your computer (lesson 3.3). GitLab links a commit to your profile only when that address is one of the verified addresses on your account. If it is not, the commit still arrives and is still yours in every practical sense; it simply shows an unlinked name and no avatar.
The fix is one of two things, whichever suits you:
- Add the address to GitLab. Avatar → Edit profile → Emails → add your work address and confirm it. You can have several; commits matching any verified address are linked.
- Change the address in Git.
git config --global user.email "the-verified-one@example.com", or set it per repository for a project that needs a different identity (lesson 3.4).
The profile fields that matter
Avatar → Edit profile. Most fields are optional; these three earn their place:
| Field | Why colleagues care |
|---|---|
| Full name | It appears on every merge request, comment and commit. Use the name people call you at work |
| Avatar | The fastest way to scan who did what in a long thread |
| Pronouns, Time zone | Useful in a distributed team; the time zone tells a reviewer whether to expect an answer today |
Busy and the status message (the emoji and text next to your name) are worth knowing: setting a status saying you are on leave stops people waiting on a review that will not come this week.
Notifications
The default is generous and quickly becomes noise. Avatar → Preferences → Notifications sets a global level, and each group and project can override it:
| Level | You are emailed about |
|---|---|
| Global | whatever the level above says |
| Watch | every activity in the project |
| Participate | threads you created, commented on, or were mentioned in (the sensible default) |
| On mention | only when someone writes @you |
| Disabled | nothing |
A practical setup: Participate globally, Watch on the one or two projects you own, On mention on the noisy ones you are only nominally part of. Then the mail you receive is mail you should read, which is the point.
How to do it
Nothing here is a Git command, but two commands connect your computer to the account you just made:
$ git config --global user.emailana@northwind-trails.exampleCompare that with the verified addresses on your profile. And after any change:
$ git config --global user.email "ana@northwind-trails.example"VS Code shows your GitLab identity only through the GitLab Workflow extension, which needs a token (lesson 8.3). Nothing about your profile is edited from the editor.
What VS Code does use is user.email, through Git; that is the address that decides attribution.
Settings → Version Control → GitLab adds your account with a token, which enables the merge request features. Your commit identity still comes from ~/.gitconfig unless you fill the Author field in the commit dialog.
- Avatar → Edit profile for name, avatar, pronouns and time zone.
- Emails in the left menu of that page for additional addresses; each needs confirming.
- Avatar → Preferences → Notifications for the global level; the Notification setting control on each project page overrides it.
- Avatar → Edit profile → Account for your username, two-factor authentication and account deletion.
The same ideas with different labels: Settings → Profile for name and avatar, Settings → Emails for verified addresses (with an option to keep your address private behind a @users.noreply.github.com alias), and Settings → Notifications for the levels. See lesson 10.1.
Common mistakes
- A commit email that is not verified on the account. Grey avatar, unlinked name. Add the address or change
user.email. - Expecting an email change to fix old commits. It does not, and it does not need to.
- A username you regret. It is in your profile URL and referenced from mentions; changing it later breaks links.
- Leaving notifications at the default. Everything arrives, so nothing gets read, and a review request is missed.
- No two-factor authentication. Most organizations require it eventually, and it is the reason tokens exist (lesson 8.5).
Try it yourself
Goal: confirm your commits will be attributed to you.
- Run
git config --global user.emailand note the address. - On GitLab, open Avatar → Edit profile → Emails and check whether that exact address is listed and confirmed.
- If it is not, add it (or change your Git setting to one that is).
- Make a commit in your playground and push it, then look at it on the project's Code → Commits page.
- While you are there, set your notification level to Participate under Preferences → Notifications.
Expected result: the commit shows your avatar and links to your profile.
Show solution
If the commit still shows an unlinked name, the address in the commit is not the one you verified: git log -1 --format='%ae' prints the exact address the commit carries, which is the value to compare. Older commits keep whatever they had; only new ones pick up the change.