Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 36 ยท Getting Started

Your GitHub Account and Profile

Create a GitHub account, choose a username, protect it with two-factor authentication, set your commit email correctly and build a profile README that presents your work.

Your GitHub account is your identity on the platform: it owns repositories, appears on every commit and comment you make, and is what future teammates or employers will look at. A few minutes spent on setup now prevents common problems later, such as commits that are not linked to your profile or an account that gets locked out.

You will set up the account, secure it, make sure your commits are attributed to you, and add a profile README.

Creating the account

Go to github.com and choose Sign up. You need an email address, a password and a username. Some practical advice for the username, since changing it later breaks old links:

  • It may contain letters, numbers and single hyphens, and cannot start or end with a hyphen.
  • Prefer something professional and stable. It becomes part of every URL you own (github.com/<username>/<repo>).
  • You can rename later in Settings > Account, and GitHub redirects most old links, but anything referencing the old name in code or documentation (for example an installed package URL) can break.

After signing up, verify your email address. Several features, including creating repositories from some flows, depend on a verified address.

Protect the account

Two-factor authentication (2FA) is required for contributors on GitHub, and you should enable it as soon as you can. Under Settings > Password and authentication you can set up:

  • Passkeys (recommended): a cryptographic credential stored in your device or password manager, resistant to phishing.
  • Authenticator app (TOTP): a six-digit code that changes every 30 seconds.
  • Security keys: a hardware device such as a USB key.
  • Recovery codes: download and store these somewhere safe. They are the way back in when you lose your device.

Save your recovery codes in a password manager or print them. If you lose both your second factor and your recovery codes, GitHub support cannot simply restore access to the account.

Your commit identity

Every Git commit records a name and an email address. GitHub links a commit to your profile by matching that email to an address on your account. If they do not match, the commit shows a gray avatar and does not count toward your contribution graph.

Set your identity locally once:

Terminal
git config --global user.name "Ada Lovelace"
git config --global user.email "[email protected]"

Public commits expose that email to anyone who downloads the repository. GitHub offers a private alternative: under Settings > Emails, tick Keep my email addresses private and Block command line pushes that expose my email. GitHub then gives you a no-reply address of the form [email protected], which you use in user.email. Commits made on the website use it automatically.

JS Stand-in: does this commit count for my profile?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The third commit is the classic mistake: a fresh machine with no user.email set, so Git guessed one from the hostname. Fix future commits with git config; to relink old ones you can add that email to your account instead of rewriting history.

Building your profile

Open your profile (github.com/<username>) and choose Edit profile. Useful fields are your name, a one-line bio, location, company, website and pronouns. You can also pin up to six repositories to the top of your profile, which is the best place to show your strongest work. Pin projects you can explain well, with a clear README.

The profile README

If you create a public repository with exactly the same name as your username, GitHub shows its README.md at the top of your profile. GitHub even offers a template when you create such a repository. It is plain Markdown:

MARKDOWN
# Hi, I'm Ada

I build small tools for teaching programming.

- Currently learning: Rust
- Ask me about: compilers, teaching, accessibility
- Find me: [my website](https://example.com)

Keep it short and honest. A list of three current projects with links works better than a wall of badges.

Notifications and preferences

By default GitHub notifies you by email and on the site (the bell icon at the top) about issues, pull requests and discussions you watch or take part in. In Settings > Notifications you can choose which events send email, set different addresses for different organizations, and use Watch options on each repository (Participating, All activity, Custom, or Ignore) to control the volume. Beginners often leave everything on and are flooded; start with "Participating and @mentions" for repositories you do not own.

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. Why might a commit show a gray avatar instead of your profile picture?

    GitHub matches commits to accounts by the author email. Unknown emails are not linked.
  2. 2. How do you get a profile README?

    A public repository whose name matches your username, containing a README.md, is displayed on your profile.
  3. 3. What is the main purpose of recovery codes?

    They are one-time codes used when your device or authenticator is unavailable.

Summary

  • Choose a stable username, verify your email and enable 2FA, preferably with a passkey.
  • Store recovery codes safely.
  • Commits link to your profile through the author email; use a verified address or the GitHub no-reply address.
  • Pin repositories and create a username/username repository for a profile README.
  • Tune notifications early so you do not drown in email.

Next: Your First Repository