Because my classroom work has us using the remote repo and I couldn’t get the visualization tool to hook up to that, my screen shot “isn’t much”. But here it is:
I did find out about request-pull, that’s an interesting command I will add to my repertoire and teaching information.
Basically, our flow is:
- checkout branch
- make changes and commit
- push to github
- pull-request and merge on github
- pull to master
- merge master to branch
repeat until project is done
From a given starting point, students develop serveral distinct features, which will be merged at the end.
not a real example because we dont use branching, but the idea is to develop an analysis workflow in R, then switch to newbranch to test a new analysis, then merge the tested code to the master
Not sure if I understood the question, but I expect my students to fork my assignments repo, and work from their own forks. I also ask them to tag their releases (d1, d2, as seen in the picture).
I didn’t have a ready-to-go assignment to create here, so I made a demo assignment where students recreate T.S. Eliot’s “The Wasteland” using version control. Everything was merged back into master in the end, but these could just as easily have been left separate.
Like a number of others on this thread, I’m not sure of the best way to use git and github in the classroom and still figuring that out.
I do think https://git-school.github.io/visualizing-git is a fantastic tool for teaching branching, merging, and history rewrite dangers.
This is hypothetical, but I was thinking of asking students to make a branch for every exercise of an assignment. That way I can review their work by checking out their branches to see what they did for each exercise. Afterwards I might ask them to make some changes to some of the exercises.
There might have been an error with the visualization tool that’s been fixed? This is the result I get, I stopped when it became apparent my result isn’t what you got:
The first problem I spot when looking at the commands you issued is
git checkout newbranch. When you run that command, newbranch must already exist, iow, you need to run
git branch newbranch before that. If you want to both create and checkout a new branch, you can use
git checkout -b newbranch.
Give the exercise another try, remember to create branches before checking them out or using
git checkout -b branch-name.
It’s totally okay not being sure how to structure assignments for students, you can use the visualization tool to play around and test ideas.
Probably not what I’ll add straight away as an assignment, but more of an introduction on how their environment will look like later one during possible programming assignments with multiple students.
This is awesome. Mind if I point to it as an example?
Sure go ahead @mozzadrella ! I was unaware of the existance of this website and will integrate this in one of the introduction classes of git. It’s a great visualisation for something that’s often hard for students new to git to get a grip on.
Not 100% on what I am supposed to do here but I think it is to show I understand the branching mechanics which are evidenced in my screenshot. And this is what is done in 2.3 rather than 2.2. A tad confusing