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.


(Michael Mckenzie) #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


(Dave Avis) #296

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.


(Ja League) #297

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.


(Umangshuklait) #298


great experience :slight_smile:
explore more tools: https://education.github.com/


(Christophe Troestler) #299


(P Buda) #300

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. :sunny:


(Emanuel Kitzelmann) #301

I have no class yet working with GitHub, just be training myself for now.