Module 2 Exercise 2: Recreate Your Assignment Workflow


(Ocrozo) #281


(Brian Emilius) #282

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.


(Sarah Dukes) #283


(José Luis Raffalli) #284


(Tigarto) #285

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

Image:


(Cynthia Teeters) #287


(Dominique Charlebois) #288


(Chris Cannon) #289

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.


(Mickpmack) #290

This is a faked up workflow


(Stevenalston) #291


(Robert Ulmer) #292

Re-create my branch merge assignment Here the forum is called 2.2 in the course it is 2.3 :slight_smile:


(Adamsdsit) #293

I’m starting to understand the organization aspect to this…slight_smile:


(Marco Secchi) #294


(Shangni Hu) #295