# Version Control with Git > Tenth graders learn how professional teams track their code with Git. A repository keeps the full history; commits are snapshots; branches let you work… **Computer Science** | **Grade 10** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g10-cs-version-control.html* Tenth graders learn how professional teams track their code with Git. A repository keeps the full history; commits are snapshots; branches let you work safely in parallel; and push/pull keeps a team in sync. They explore each idea, then plan a simple Git workflow. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Explain a **repository** and **commits**. - Use **branches** safely. - Keep a team **in sync**. - Plan a Git workflow. How do teams track changes and work on code together without chaos? ## The Git Explorer Project this and tap each. Have students explore the core ideas of version control. ## 55 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — Who Changed What? How does a team avoid overwriting each other’s code? #### 👩‍🏫 Teacher Moves - Show a messy shared file. - Ask how pros manage it. - Set the goal. #### 🎒 Student Actions - Think. - Guess. - Get ready. ### Use — Version Control Students use the idea. #### 👩‍🏫 Teacher Moves - Send students to the Git Explorer. - Tap each concept. - Note commit, branch, push/pull. #### 🎒 Student Actions - Tap each. - Say. - Note it. ### Modify — Branch & Merge Students modify. #### 👩‍🏫 Teacher Moves - Create a branch for a feature. - Make a commit on it. - Merge it back to main. #### 🎒 Student Actions - Branch. - Commit. - Merge. ### Create — Plan a Workflow Students create. #### 👩‍🏫 Teacher Moves - Write a 4-step team workflow. - Decide who branches when. - Add a commit-message rule. #### 🎒 Student Actions - Write. - Decide. - Add. ### Reflect — Reflect Students close. #### 👩‍🏫 Teacher Moves - Say what a commit is. - Say why branches help. - Complete the exit ticket. #### 🎒 Student Actions - Say it. - Say. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students. Design and develop artifacts working collaboratively. Document a program to make it easier to test and debug. Decompose work into parts for a team. Use collaborative tools to work with others. ## One lesson, every learner ### Multilingual Learners - Use a “track changes” analogy. - Frame: “save, branch, merge, sync.” - Label a Git diagram. ### Support & Access - Start with commit & repo. - One concept at a time. - Use pictures. ### Stretch & Extend - Resolve a merge conflict (in theory). - Write good commit messages. - Try a pull request. ### What to gather - 📽️Screen / board - 🌿Git concept cards - 💻The Git Explorer - 🐙GitHub (optional) - 📓Notebooks - 🎫Exit-ticket slips ### Key terms - **version control**: tracking changes to code over time - **repository**: a project and its full history (repo) - **commit**: a saved snapshot with a message - **branch**: a separate line of work - **merge**: combine a branch into the main code - **push**: upload commits to a shared server - **pull**: download others’ changes - **conflict**: two changes to the same line ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Reflect: version control. Have students write a 4-step Git workflow for a team project. A printable version-control worksheet is in the Computer Science library. ## Check your understanding **1. What does “version control” mean?** - tracking changes to code over time *(correct)* - upload commits to a shared server - a saved snapshot with a message - combine a branch into the main code “version control” means: tracking changes to code over time **2. Which word means: “a project and its full history (repo)”?** - push - commit - repository *(correct)* - version control “repository” means: a project and its full history (repo) **3. What does “commit” mean?** - a separate line of work - a project and its full history (repo) - two changes to the same line - a saved snapshot with a message *(correct)* “commit” means: a saved snapshot with a message **4. Which word means: “a separate line of work”?** - repository - pull - branch *(correct)* - version control “branch” means: a separate line of work **5. What does “merge” mean?** - two changes to the same line - upload commits to a shared server - combine a branch into the main code *(correct)* - tracking changes to code over time “merge” means: combine a branch into the main code **6. Which word means: “upload commits to a shared server”?** - version control - push *(correct)* - conflict - repository “push” means: upload commits to a shared server ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g10-cs-version-control.html All lessons: https://lessonplans.k12academics.com/