Workarounds for Updates to Starter Code in Classroom

Continuing the discussion from :wave: Teachers! Introduce yourself here: @aktemuris looking to tweak starter code after their students accept the assignment.

Does anyone know of a good workaround instead of deleting + recreating? Wonder if @gcschmit has an idea.


While not being able to update all students’ repositories at once is a limitation of the sandbox approach, having tried to fork and pull request model, the advantages far outweigh the disadvantages. When I’ve run into this challenge, it has been for new code as opposed to changes to existing code. I have opted to post the code on Canvas (our Learning Management System) and have students add the files to their repositories manually.

There is probably some way to automate via a script the process of adding files to each student repository given a list of all student repositories. I haven’t been inconvenienced enough to do this :slight_smile:

1 Like

Let the students add your updated repo as a new remote.
git remote add <name> <url>

Then let them pull from it and merge it into their existing repo
git pull <name> <branch>

You provide the code and your students are responsible for acquiring the code


Thanks. I’ll try this approach the next time.

hi Luyts!

Will this work if the starter repo is private?



@hamishcunningham should work as long as students have collaborator permissions on the starter repo.

thanks Vanessa – do they get collab perms on the starter repo when they
click the assignment link,
or would they need individually adding as collaborators?

cheers, h

1 Like

@hamishcunningham here’s the scoop:

  • If it’s an individual exercise, students become outside collaborators and can see only their repo. I suggest collecting their usernames via a google form if you want to add them.

  • If it’s a group exercise, students become a team inside the GitHub organization, and so they can see your repo (unless you set permissions to none) and you need to change the settings.

Hope this helps.

Yes well made to make all cear

1 Like