Welcome to the guide for setting up Git and GitHub on Windows. This guide assumes no prior coding or Git experience.
We will cover:
.exe
file.Open the Command Prompt:
Win + R
, type cmd
, and press Enter.Type the following command and press Enter:
git --version
You should see a version number, e.g., git version 2.x.x
.
Open the Git Bash application (installed with Git).
Run the following command:
ssh-keygen -t ed25519 -C "your_email@example.com"
your_email@example.com
with your GitHub email address.When prompted:
Your SSH key will be saved to a default location, e.g., C:\Users\YourName\.ssh\id_ed25519
.
Run the following command in Git Bash:
cat ~/.ssh/id_ed25519.pub
Copy the output (Ctrl + C).
Open Git Bash.
Run the following command:
ssh -T git@github.com
If successful, you will see a message like:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
C:\Program Files\Git\bin\git.exe
.Open the Terminal tab in RStudio (found at the bottom-right of the screen).
Verify the SSH key is correctly set up by running:
ssh -T git@github.com
If successful, proceed to the next step.
git@github.com:username/repo.git
).You have successfully:
You are now ready to use the Git GUI in RStudio to manage your projects and collaborate effectively!