Assignment with task 1 and task 2 as milestones.
General workflow is to create a working branch for writing the answers. Once that is complete, merge it back into the master branch. In the real world, they would not merge directly but instead push all branches to origin and open a pull request to merge solution into master. At that point I’d evaluate the PR
I am not entirely convinced that I have carefully thought through the potential for creating new branches for assignments. I have used git a fair amount coding in a team, I have tried to use it in the past for teaching and I felt like it was not really well suited classroom applications because it had been designed for collaborative development. I am starting to think this might have been more about my preconceptions because of what I originally learned to do with git. I do think that the two modes of operation are very different. In dev environment the efforts of several people are focused on creating a single “final” version, or at least a release. In an instructional environment we give a set of instructions, maybe with some starter or sample code: and each individual is supposed to create a unique solution.
I have an idea about having each of my students create their own “cheatsheet” or library of code samples. The would be responsible for updating it as we cover various features of the language we are studying. I am not at all convinced that I have leveraged the idea of using branches to the best advantage.
We haven’t actually done this yet, but this is how I imagine students working on a simple website, adding content first, then creating layout elements, and styling it all in the end.
No real workflow here yet. Playing around to understand the basics and get a feeling of what it can contribute to classroom activities in a non-programmers department.
This is so cool!
You can delete the branch, or, as you get more comfortable, cherry pick the commits you want to move:
There are more advanced workflows for this, including reset hard and rebase. There’s documentation on those commands if you’d like to find out more:
@MrODonnell the of branches is that, 99% of the time, we’re on a branch, so we’re almost always using them.
I like using that second for your code sample project.
@OmalPerera here’s a diagram of a real-world workflow…might you want to include a development branch in addition to features?