GitHub Classroom Workflow

GitHub
Accept an assignment, clone the repo, set up a virtual environment, and submit your work.
Published

December 30, 2025

GitHub Classroom Workflow

Creating with AI in the Loop — Assignment workflow (repeat for each assignment)

This guide covers the steps you’ll follow for each GitHub Classroom assignment:

  1. Accept the assignment and clone the repo
  2. Create a virtual environment and install dependencies
  3. Do the work
  4. Commit and push (submit)

Prerequisite: Complete the one-time setup first: Initial Setup (Windows) | Initial Setup (macOS)


1) Accept the GitHub Classroom assignment

  1. Click the Classroom invite link (from the Assignments page).
  2. Click Accept assignment.
  3. GitHub creates a repo for you and takes you to it.

2) Clone the repo

Copy the repo HTTPS URL from GitHub (click Code → HTTPS).

  1. In VS Code: Ctrl+Shift+P → Git: Clone
  2. Paste the URL
  3. Pick a folder
  4. Open the repo when prompted
cd C:\Users\YourName\Documents
git clone <PASTE-REPO-URL-HERE>
cd <REPO-FOLDER>
code .
cd ~/Documents
git clone <PASTE-REPO-URL-HERE>
cd <REPO-FOLDER>
code .

3) Create a virtual environment and install dependencies

Open a terminal in VS Code: Terminal → New Terminal

py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt

If PowerShell blocks the activation script:

py -3.13 -m venv .venv
.\.venv\Scripts\activate.bat
python -m pip install --upgrade pip
pip install -r requirements.txt
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt

If the repo has a pyproject.toml or setup.py, also run:

pip install -e .

Verify the venv is active

python --version
where python

The where python output should show a path inside .venv.

python --version
which python

The which python output should show a path inside .venv.


4) Sanity checks

If the repo has tests:

pytest -q

Or run a quick Python check:

python -c "print('Hello from Python!')"

5) Do the work

Complete the assignment according to the instructions in the repo’s README.


6) Commit and push (submit)

Typical “submission” is commit + push. Autograding (if enabled) runs after you push.

  1. Open the Source Control panel (left sidebar)
  2. Stage changes (click + next to files)
  3. Enter a commit message
  4. Click Commit
  5. Click Sync Changes (pushes to GitHub)
git status
git add .
git commit -m "Complete submission"
git push

After pushing, check your repo on GitHub. If autograding is enabled, you’ll see a ✅ or ❌ next to your commit.


Troubleshooting

git push permission/auth errors

  • Make sure you accepted the assignment with the correct GitHub account
  • Retry push and complete the browser sign-in flow if prompted
  • Check that the repo URL matches your GitHub username

If issues persist, run these commands and include the output in your help request:

git remote -v
git config --global credential.helper
git config --show-origin --get-all credential.helper

PowerShell won’t activate .venv (execution policy)

Use Command Prompt instead:

.\.venv\Scripts\activate.bat

Or (advanced) allow local scripts in PowerShell:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

requirements.txt not found

Not all assignments have a requirements.txt. Skip the pip install -r requirements.txt step if the file doesn’t exist.

Tests failing after push

  • Read the error message in the GitHub Actions log
  • Fix the issue locally
  • Commit and push again

Quick reference: common commands

Task Windows (PowerShell) macOS
Create venv py -3.13 -m venv .venv python3.13 -m venv .venv
Activate venv .\.venv\Scripts\Activate.ps1 source .venv/bin/activate
Deactivate venv deactivate deactivate
Install deps pip install -r requirements.txt pip install -r requirements.txt
Run tests pytest -q pytest -q
Commit all git add . && git commit -m "msg" git add . && git commit -m "msg"
Push git push git push
Back to top