Assignment: One repo per assignment, really?

Do I really have to create a separate repo for each and every assignment? So if I want to give 15 assignments, then I have to create 15 separate GitHub repos? That’s just…wayyy too much form-filling-out, isn’t it?

I was imagining one repo for the course, with subdirectories for assignments.

Am I missing something, like it’s maybe somehow “not that big of a deal”?

1 Like

You can certainly go your way although I can see the following technical complications.

  • You will be delivering all 15 assignments at once as a single big unit so that students will have immediate access to the entire suite. This might be a problem in some contexts where the usual approach is to keep assignments undisclosed up to when they can be really processed. Maybe this is not your case.
  • If you aim to use the mechanism of the deadline from within the Classroom dashboard, then this will cover the whole unit in the repo; one repo, one deadline.
  • The automatic testing that resorts to GitHub actions will require more logic to handle submissions to the single sub-assignment.

In practice, all the tools and tidbits GitHub has been making available to support the classroom are specifically tailored to the case of “one repo, one assignment” (see for example the use of the automatic PR as well). Adapting this workflow is possible but comes at some costs.

That said, the approach “one repo, one assignment” provides also clear methodological advantages for teaching and testing.

1 Like

In the past I had used one repo/many assignments but switched to one repo/one assignment.

For the one repo/many assignments I had to manually update the master source repository over the semester and reset at the beginning of a new semester. Students would git pull from the master source but if the made mistakes, merge conflicts would occur and it would get messy. Automatic tests (via actions) were also not easy to implement (as stated by @pattacini ).

I am now using GItHub Classroom with one repo/one assignment, which is overall a cleaner set up. Having large numbers of repos in the org is a bit annoying but a minor issue as one can just use consistent naming and filter. A major issue is if you made a mistake in the template repo and then want to update all student repositories. I haven’t found a better way than cloning all student repos, manually fixing, and pushing back to each individual student repo (using shell scripts).

© 2017 GitHub, Inc.
with by
GitHub Education