Prerequisites
Before we begin, make sure you have:
- A Windows computer with administrator privileges
- An active internet connection
- A GitHub account (create one at github.com if you don't have one)
- Your default browser logged into GitHub
Part 1: Installing Git
Git is the version control system that tracks changes in your code. Follow these visual steps to install it:
Step 1: Download Git
- Visit the official Git download page: https://git-scm.com/downloads/win
- Click on "Git Standalone Installer" to download the latest version
Step 2: Run the Installation Wizard
Launch the downloaded installer and follow these screens:
Welcome Screen

- Click "Next" to begin the installation
Installation Options The installer will present you with multiple configuration screens. For beginners, it's recommended to keep all default settings by clicking "Next" through each screen:

Step 3: Verify Git Installation
Open PowerShell
-
Search for "PowerShell" in the Start menu and open it

Check Git Version
- Type the following command and press Enter:
git --version
-
You should see the Git version displayed, confirming successful installation

✅ Git is now successfully installed!
Part 2: Installing GitHub CLI
GitHub CLI allows you to interact with GitHub directly from your command line.
Step 1: Download GitHub CLI
- Visit the GitHub CLI website: https://cli.github.com/
- Download the Windows installer
Step 2: Install GitHub CLI
Run the Installer
-
Launch the downloaded installer

Installation Directory
- Keep the default installation directory and proceed with the installation
Step 3: Verify GitHub CLI Installation
Open PowerShell
-
Open PowerShell (if not already open)

Check GitHub CLI Version
- Type the following command:
gh --version
-
You should see the GitHub CLI version information

✅ GitHub CLI is now installed!
Part 3: Authenticating with GitHub
Now we'll connect your local setup with your GitHub account.
Step 1: Start Authentication Process
Initialize Login
-
In PowerShell, type:
gh auth login
Step 2: Configure Authentication Settings
Select Options

Follow the prompts and select these recommended settings:
- Account:
GitHub.com - Protocol:
HTTPS - Authenticate Git:
Yes - Authentication method:
Login with a web browser
Step 3: Complete Web Authentication
Copy the One-Time Code The terminal will display an 8-character code. Copy this code and press Enter.
Browser Authentication

- Your browser should open automatically to the GitHub device activation page
- If it doesn't open, manually go to: https://github.com/login/device
Enter the Code
- Paste the copied code and click "Continue"

Authorize GitHub CLI
- Click "Authorize GitHub" when prompted

Authentication Complete


- You'll see success messages both in your browser and terminal
✅ Authentication complete!
Final Verification
Test that everything is working:
Configure Git (First Time Setup)
Important Notes:
- Use the same email address that's associated with your GitHub account
- You can find your GitHub email in your GitHub profile settings
- If you have email privacy enabled on GitHub, use your GitHub-provided no-reply email address (e.g.,
ID+username@users.noreply.github.com)
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Test GitHub Connection
gh repo list
If you see your repositories (or an empty list if you don't have any), everything is working perfectly!
Troubleshooting
Common Issues:
- Git/gh command not found: Restart PowerShell after installation
- Authentication failed: Ensure you're logged into GitHub in your browser
- Permission denied: Run PowerShell as administrator
For more help, visit GitHub Docs or Git Documentation.