push_files to student repos after initial push
I'm using the sandboxing approach with private repositories for the students. I wanted to distribute the next lab exercise to the students' repositories after having already pushed the first lab. The new lab is located in a separate folder, e.g. lab2. This, I now realize, won't work, since the students will have pushed their own changes to their repositories, thereby my push being rejected.
Is there an idiomatic way to solve this problem with teachers_pet, or in general with git??
PS: I cannot do a push --force since the students' work on the previous labs would be lost every time I would push something.
The easiest approach would be to simply create separate repositories for each lab. If you want to keep them all in one, you could modify teachers_pet to do a merge locally, but dealing with merge conflicts could be a huge pain.
That was my first thought, but since I have 7 lab exercises and over 40 students, the total number of private repositories becomes too many for this to make sense (and it would exceed what I currently have for my course).
My current approach is to ask the students themselves to pull in my updates from the origin repository (and I'll be careful to only add new lab material each time there is a new lab to be released). So far it has worked out ok (have only done it once so far), but I suspect some students will run into trouble, and some of them have already. Using github has been quite a learning experience for both staff and students.
Yeah, I try to avoid having students do merges whenever possible.
In the future, though, life will be easier if you request one repository per student per assignment.
...but restricting your changes to new labs should hopefully make the merges clean, so that's good!