Windows
Download Git for Windows, run the installer, and keep the recommended options.
Linux
Install Git with your distribution’s package manager, for example:
Alternatively, visit git-scm.com.
Open a new terminal window and run:
You should see a version number, for example git version 2.47.1.windows.1.
If the command is not found, close and reopen the terminal. On Windows, you may try Git Bash rather than Command Prompt.
Git records an author name and email address with every commit.
Run these commands once (replacing the placeholders):
Check the saved values:
Use an email address verified in GitHub (later on) if you want GitHub to link your commits to your profile. You can change that at any point.
GitHub will hold the shared online copy of the project.
Student benefit: After creating your GitHub account, apply for GitHub Education. Verified students can activate GitHub Copilot Student for free.
SSH is a secure way for Git on your computer to communicate with GitHub. Your private key stays on this computer, while GitHub uses the matching public key to recognize you when you push or pull. This avoids sending your password.
On Windows, open Git Bash for the commands below. First, check whether this computer already has an Ed25519 public key:
If the file exists, keep it and display it with the final command below. Otherwise, create a key:
Using Command Prompt instead? Replace ls with dir %USERPROFILE%\.ssh\id_ed25519.pub and cat with type %USERPROFILE%\.ssh\id_ed25519.pub. Press Enter to accept the proposed key location.
SSH is optional. GitHub also works through HTTPS, browser sign-in, and Git Credential Manager. SSH is convenient because the key identifies this computer after a one-time setup. SSH repository addresses begin with git@github.com, while HTTPS addresses begin with https://github.com.
Adding the public key connects the key on this computer to your GitHub account.
On GitHub, open:
Profile picture → Settings → SSH and GPG keys → New SSH key
Give the key a descriptive title, such as My laptop. Paste the public key and save it.
Copy only the file ending in .pub. Never share the private key named id_ed25519.
One connection test confirms that GitHub recognizes your SSH key.
You are ready when these work
Return to the workshop once Git is installed, your author identity is set(, and GitHub recognizes your SSH key)
Git Setup