Git Lab Pre-work
Before the Lab 13-1: Git for Version Control and Collaboration in MLOps session, please set up your machine and GitHub access so we can spend class time on Git workflows instead of installation issues.
Official prerequisites for the lab:
- Git installed on your computer
- A GitHub account (free tier is fine)
- Visual Studio Code installed (recommended for editing files and resolving merge conflicts)
- Ability to authenticate to GitHub over HTTPS using a personal access token when Git prompts for a password (set this up ahead of time; see Connect to GitHub with HTTPS below)
If any of the above is missing, complete the checklist below before lab day.
Install Visual Studio Code
- Download and install VS Code from the Visual Studio Code download page.
- After install, confirm it works
Install Git
-
Install Git for your OS from the official Git downloads page (Windows, macOS, Linux).
- Windows: Use the official installer; choose Git Bash when prompted if you want a Unix-like shell for class examples.
- macOS: Xcode Command Line Tools include Git, or use the installer from git-scm.com / Homebrew.
- Linux: Use your package manager (e.g.
sudo apt install giton Debian/Ubuntu).
-
Verify:
-
Set your name and email (use your real name and the email you will use with GitHub—often your school email):
Create a GitHub account and sign in
- Create a GitHub account or sign in if you do not already have one.
- Sign in in the browser and confirm you can see your profile.
Connect to GitHub with HTTPS (personal access token)
We use HTTPS only (https://github.com/... URLs). When you git push, git pull, or git clone from the command line, Git will ask for credentials: use your GitHub username and, for the password, a personal access token (PAT)—not your GitHub account password.
- Create a token in GitHub (Settings → Developer settings → Personal access tokens). Generate a token with at least repo scope for private repositories. For detailed steps, see GitHub Docs: Creating a personal access token. Copy the token once and store it somewhere safe (e.g. a password manager); you will not see it again.
- The first time Git prompts for a password, paste the token.
Quick pre-lab checklist
| Item | Check |
|---|---|
| VS Code installs and opens | ☐ |
git config name and email set |
☐ |
| GitHub account ready | ☐ |
| Personal access token created (repo access); you know how to paste it when Git asks for a password | ☐ |
Optional: credential.helper set if you want fewer prompts |
☐ |