Skip to content
Computer Science · Grade 10

Active learning ideas

Introduction to Version Control (Git)

Version control can feel abstract until students physically type the commands and see history preserved. Active learning works here because students experience firsthand how commits, branches, and conflicts behave, turning memorization into muscle memory. Pairing technical steps with collaborative workflows makes Git’s benefits immediate and practical.

Ontario Curriculum ExpectationsCS.HS.D.5CS.HS.D.6
25–45 minPairs → Whole Class4 activities

Activity 01

Flipped Classroom30 min · Pairs

Pair Setup: Initialize and Commit

Pairs create a shared GitHub repository and clone it locally. They take turns editing a simple HTML file, staging changes with git add, committing with descriptive messages, and pushing updates. End by pulling each other's changes to see integration.

Explain the purpose of version control systems in collaborative software development.

Facilitation TipDuring Pair Setup, circulate to ensure partners alternate roles between committer and reviewer every commit to reinforce shared responsibility.

What to look forPresent students with a scenario: 'You and a partner are working on the same file. You both make changes and commit them. What command should you use to get your partner's changes, and what command should you use to send yours?'

UnderstandApplyAnalyzeSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 02

Flipped Classroom45 min · Small Groups

Small Group Branches: Feature Development

Groups of four create a main branch then each member branches off to add a CSS style rule. They push branches, create pull requests, and merge after peer review. Discuss how branches isolate risky changes.

Analyze how Git commands (e.g., commit, push, pull) manage code changes.

Facilitation TipFor Small Group Branches, require each group to document branch names and purposes in a shared text file before coding begins.

What to look forAsk students to write down the Git command for: 1. Saving a snapshot of their current changes. 2. Sending their saved changes to a shared online location. 3. Getting the latest changes from a shared online location.

UnderstandApplyAnalyzeSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 03

Flipped Classroom35 min · Whole Class

Whole Class Conflict Hunt

Project a shared repo on the board. Students suggest overlapping edits in pairs, then as a class simulate git pull and resolve the conflict step-by-step using a merge tool. Vote on best resolutions.

Predict potential conflicts in collaborative work and how version control resolves them.

Facilitation TipIn Conflict Hunt, assign each team a unique merge conflict scenario so students see multiple conflict patterns in one class period.

What to look forFacilitate a brief class discussion: 'Imagine you just spent an hour coding a new feature, but accidentally deleted it. How could Git have helped prevent this loss? Describe the steps you would have taken.'

UnderstandApplyAnalyzeSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 04

Flipped Classroom25 min · Individual

Individual Practice: Revert Challenge

Students fork a sample repo with intentional errors, commit fixes, then intentionally break code and use git revert or reset to recover. Log successes in a reflection journal.

Explain the purpose of version control systems in collaborative software development.

What to look forPresent students with a scenario: 'You and a partner are working on the same file. You both make changes and commit them. What command should you use to get your partner's changes, and what command should you use to send yours?'

UnderstandApplyAnalyzeSelf-ManagementSelf-Awareness
Generate Complete Lesson

A few notes on teaching this unit

Teach version control by starting with the safety net: show how commits preserve every prior state before branching. Use metaphors like ‘saving a video game’ to link Git’s snapshots with familiar experiences. Avoid overwhelming students with advanced commands; focus on git add, git commit, and git push first. Research shows that hands-on practice with immediate feedback reduces anxiety about breaking code, which is critical when the tool’s purpose is to recover from mistakes.

By the end of these activities, students should confidently initialize repos, commit snapshots, and resolve conflicts using Git commands. They should articulate why branching prevents overwrites and how remote pushes enable teamwork. Successful learners will also explain Git’s role in saving work and enabling rollbacks.


Watch Out for These Misconceptions

  • During Pair Setup: Initialize and Commit, watch for students who believe commits permanently erase earlier versions.

    Use git log to display the full commit history after each push, and have students restore a previous commit using git checkout <commit-hash> to demonstrate persistence of old states.

  • During Small Group Branches: Feature Development, watch for students who think merge conflicts only happen with large teams.

    Have each pair deliberately edit the same line in separate branches, then resolve the conflict during git merge, showing that conflicts scale with parallel work, not team size.

  • During Whole Class Conflict Hunt, watch for students who equate pushing code with publishing to a live site.

    After simulating a push, demonstrate cloning the repo to a new folder and running a local server to clarify that push only stores code for review, not deployment.


Methods used in this brief