Here it is
From the official Git Cheat Sheet. I picked one up at the CSTA conference.
git branch -d [branch-name]
Deletes the specified branch
Honestly, I am not expecting my students to do any multiple branching for their projects, but if I did I imagine it might look something like this.
In my imaginary assignment, I have set a group work task - the first few commits are done in the lab with the group working together.
I’ve then asked the group members to go away and work on parts of the project independently.
To do this I’ve requested that they each create a new branch from the master branch and add their commits to their new branch.
When we come back to work in the lab we will merge these branches to update the master branch with their work.
Mine looks quite boring as I haven’t used branches with my students.
I do give them work in GitHub and then leave comments, raise issues, but so far not with branches.
Here’s my screenshot.
In our class, we plan to use git for individual assignments. Our workflow is for students to pull the starter code, create a branch for them to do work on, then they will submit a pull request when they finish the assignment. Then we will review their pr, make comments, and accept their pull request. Once this happens their changes will be merged with master.
My visualization shows a student attempting a Robotics code where they are trying to navigate a course:
They try a basic first attempt, abandon this.
Then they back up a couple of steps, try again, do better, but realize they need to add in a component where they use the wall to straighten out the direction the robot is facing.
They go back to the simplest version of the code to develop a code to add in the wall, then merge this with the more successful second attempt at the navigation.
I misunderstood the merge operation on my first try, I didn’t realize that the current branch was silent on the command line, which makes perfect sense now that I see it.
@carlesalonso nice! Merging is a great opportunity to add code review and give students feedback.