SMART OBJECTS: THE SMART CLASSROOM

Git Collaboration

Strategies for Student Contributions

SVA MFA Interaction Design · Winter 2026
Branches · Forks · Direct Collaboration

CURRENT WORKFLOW

How Code Gets to the Pis Today

The instructor controls the entire pipeline from development to deployment:

LOCAL MACHINE

Edit & test code

GIT COMMITS

git add, git commit, git push

GITHUB MAIN

Stable, working code

RASPBERRY PIS

scp deploy tested code

Key points:

  • Develop and test locally when possible
  • Commit to main branch — instructor controls stability
  • Deploy to Pis using scp for testing
  • Main branch stays clean and working

Full guide →

STRATEGY 1

Student Branches  RECOMMENDED

Instructor creates branches:

# Create a branch for each student
git checkout -b students/alice
git push -u origin students/alice

git checkout -b students/bob
git push -u origin students/bob

git checkout main  # Return to main

Student workflow:

# Clone and switch to their branch
git clone https://github.com/you/smart-objects-cameras.git
cd smart-objects-cameras
git checkout students/alice

# Make changes, commit, push
git add person_detector.py
git commit -m "Add zone detection feature"
git push origin students/alice

Review & merge:

# Review student work
git checkout students/alice
git pull

# If good, merge to main
git checkout main
git merge students/alice
git push origin main

Pros

  • Simple for students to learn
  • Easy to track individual work
  • Instructor controls what goes to main
  • Works with VS Code Remote SSH

Cons

  • Students can see each other's work
  • Requires basic Git knowledge

Full guide →

STRATEGY 2

Fork Model

Setup:

1 Student clicks "Fork" on GitHub
2 Gets their own copy: github.com/alice/smart-objects-cameras
3 Works entirely on their fork

Student workflow:

# Clone their own fork
git clone https://github.com/alice/smart-objects-cameras.git

# Make changes on their fork
git add .
git commit -m "My custom feature"
git push origin main  # Pushes to THEIR fork

# Submit Pull Request via GitHub UI

Review & merge:

  • Students submit a Pull Request from their fork to your main repo
  • You review the changes on GitHub
  • Click "Merge Pull Request" if approved

Keeping fork updated:

# Sync with instructor's repo
git remote add upstream https://github.com/you/smart-objects-cameras.git
git fetch upstream
git merge upstream/main

Pros

  • Complete independence for students
  • Professional OSS workflow experience
  • Cannot accidentally break main repo

Cons

  • More complex for beginners
  • Extra fork management overhead

Full guide →

STRATEGY 3

Direct Collaboration (Simple)

Best for: Quick prototyping, students working directly on Pis, minimal Git usage

Students work on Pi — no Git needed:

# Each student makes their own copy
cd ~/oak-projects
cp person_detector.py person_detector_alice.py

# Edit their personal copy
nano person_detector_alice.py

Instructor pulls work when ready:

# Pull student work from Pi
scp orbit:~/oak-projects/person_detector_alice.py ./students/

# Commit to their branch
git checkout -b students/alice
git add students/person_detector_alice.py
git commit -m "Alice: Zone detection feature"
git push origin students/alice

Pros

  • No Git knowledge required for students
  • Focus on coding, not version control
  • Works great with VS Code Remote SSH
  • Students experiment freely on Pi

Cons

  • Manual work for instructor to commit
  • Students don't learn Git
  • No version history during development
Best for early weeks when students are focused on learning camera/CV concepts rather than version control.

Full guide →

DECISION GUIDE

Which Strategy Should You Choose?

Student Branches  RECOMMENDED

Choose when:

  • Students understand basic Git
  • You want to review code before merging
  • Working on shared template collaboratively

Skill level: Basic Git

Fork Model

Choose when:

  • Teaching professional workflow
  • Students building independent projects
  • Want complete isolation between students

Skill level: Professional

Direct Collaboration

Choose when:

  • Students are new to Git
  • Focus is on camera/CV learning
  • Quick iteration is priority
  • Can teach Git later

Skill level: New to Git

Full guide →

SECURITY

What NOT to Commit  IMPORTANT

Required .gitignore:

# Secrets
.env
*.env

# Generated files
camera_status.json
latest_frame.jpg
*.log

# Python
__pycache__/
*.pyc
venv/
.venv/

# OS
.DS_Store
Never commit these files:
  • Discord bot tokens — anyone can impersonate your bot
  • Webhook URLs — anyone can post to your channels
  • SSH keys — full access to your servers
  • .env files — contain all of the above
If you accidentally commit a secret:
The token is compromised even if you delete it in the next commit. You must regenerate the token immediately on Discord/GitHub.
Rule of thumb: If it contains a password, token, or key — it goes in .env on the Pi, never in the repo.

Full guide →

RECOMMENDED

Hybrid Approach for Classrooms

Introduce Git progressively as students build confidence with the tools:

1 Week 1–4: Direct Collaboration  (no Git for students)
Students work on Pis, make personal copies of files. Focus on learning camera/detection/Discord. Instructor commits interesting work to student branches.
2 Week 5+: Introduce Branching  (basic Git commands)
Students learn clone, checkout, commit, push. Work on their own branches. Submit work via push.
3 Advanced Students: Fork Model  (for final projects)
Independent projects with full GitHub PR workflow. Real open-source experience.
Key teaching points: Main branch = stable template  •  Your branch = your experiments  •  Commits = save points  •  Push = share work  •  Pull = get latest code

Full guide →