Git

Verification

Check if Git is already installed:

git version

If you see output like git version 2.48.1, Git is installed and you can skip to the GitHub section.

Installation

Download the Git installer from the official Git website.
Run the installer and make sure to select the option to install Git Bash when prompted.

Git Configuration

After installing Git, configure your identity and preferences:

Set Your Name

git config --global user.name "Your Name"

You can use a pseudonym if you want to keep your real name private.

Set Your Email

git config --global user.email "your_email@example.com"

To keep your email private, GitHub offers a noreply email. Set this up by going to:

  1. GitHub → Settings → Emails
  2. Enable “Keep my email address private”
  3. Use the provided username@users.noreply.github.com

Set Default Branch Name

git config --global init.defaultBranch main

Git-Mastery

  1. Download the .exe file from the latest release.
  2. Add the .exe to your PATH following this guide.

GitHub

Create Account

Create a new GitHub account if you don’t have one.

HTTPS Setup

By default, Github will use HTTPS, which will prompt for your Github username and Personal Access Token (PAT) every time.

[!INFO] If you intend to use HTTPS, you can skip the “SSH Setup” section.

1. Setup PAT

Github no longer supports account passwords for HTTPS, you will need to setup a PAT.

  1. Go to Github → Settings -> Developer settings -> Personal Access Tokens -> Tokens (classic)
  2. Click “Generate new token”, and set the expiration and scopes (minimum scope is repo)
  3. Copy the token and store it safely

2. Using the PAT

When you are prompted to enter your Github credentials, use your Github username and PAT as the password.

SSH Setup

1. Check for Existing SSH Keys

ls -al ~/.ssh

Look for files like id_ed25519.pub.

2. Create New SSH Key

ssh-keygen -t ed25519 -C "your_email@example.com"

3. Add SSH Key to ssh-agent

In a PowerShell (Admin) window:

Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
ssh-add ~/.ssh/id_ed25519

4. Add SSH Key to GitHub

Copy your public key:

cat ~/.ssh/id_ed25519.pub

Then add it to GitHub → Settings → SSH and GPG Keys.

5. Verify SSH Connection

ssh -T git@github.com

Say yes when prompted, and you should see a welcome message with your username.

GitHub CLI

Installation

Download the .msi installer from the GitHub CLI releases page.

Authentication

gh auth login

Choose SSH when prompted.

Verification

gh auth status

You should see confirmation that you’re logged in with SSH protocol.

Verify that Github and Github CLI is setup for Git-Mastery:

gitmastery check github