Okay, so basically, when my students work on individual assignments they clone the repo, then create a
dev branch which they then work on with their commits. Once they are ready to hand in the assignment for review and feedback, they push their
dev branch and create a pull-request, and request their teacher as reviewer.
I could not get the visualization tool to simulate PRs, but here it is.
Commands and its outputs:
git commit git commit git branch * master git checkout -b assignaments git branch master * assignaments git commit git commit git checkout -b project1 git commit git checkout -b team1 git commit git commit git branch master assignaments project1 * team1 git checkout project1 git branch master assignaments * project1 team1 git branch team2 git branch master assignaments * project1 team2 team1 git checkout team2 git branch master assignaments project1 * team2 team1 git commit git commit git commit git checkout project1 git branch team3 git checkout team3 git commit git branch master assignaments project1 team1 team2 * team3 git checkout project1 git branch master assignaments * project1 team1 team2 team3 git merge team1 You have performed a fast-forward merge. git merge team2 git merge team3 git branch master assignaments team1 team2 team3 * project1
It’s not always easy to see how branches can fit into a student assignment. They make a ton of sense when working on large, preexisting projects, but not always when the project is being made from scratch. One of the really great use cases I have found is to break a project into milestones, and have them make a branch for each milestone. So their first branch has the first milestone, and then they make a new branch for the second milestone (branching from the first branch so they keep their changes). This way if they run into trouble on the next step, they have an untouched version of the last milestone for grading, it also makes it very easy to grade through multiple pull requests.
Not sure what to put here since the students copy the starting repo via the Github Classroom link, then just make commits to their repo at the end of each class until they are done.
Students don’t use branching within their expected workflow as we use classroom to assign them their own repo for each project. However, here is conceptually the way in which each students gets a ‘branch’ from the master assignment repo.
explore more tools: https://education.github.com/
This would be just a start of an assignment for individual students (not a group project in Git yet). The next phase would be to merge the “dev” branch with the “master” after the “issue1” was fixed and merged with the “dev” branch.
Branching is challenging but I start feeling it a bit.