Want to simplify your Git workflow on Windows? Here’s a straightforward guide to connect to your Git repo securely, create a new one, and push your code without the need for remembering or updating old passwords
Step 1: Open Command Prompt
Hit Win + R
, type cmd
, and press Enter.
Step 2: Install Git
If you don’t have Git, grab it from git-scm.com.
Step 3: Generate Your SSH Key with RSA algorithm
Run this command:
Just hit Enter to stick with the default location. You can set a passphrase or skip it.
Step 4: Copy Your Public SSH Key
Open it in Notepad:
Swap out YourUsername
with your actual username. Copy that key!
Step 5: Add Your SSH Key to GitHub
Log in to GitHub. Head to Settings > SSH and GPG keys. Click New SSH key. Paste your key and save.
Step 6: Go to Your Project Directory
Use this command to navigate:
Step 7: Initialize a New Repo
Run:
Add your files:
Step 9: Make Your First Commit
Commit with a message like this:
Step 10: Link to Your Remote Repo (You need to create it first on Github)
Run this command: