How to prevent commits through web interface for GitHub repositories

354 views Asked by At

I'm teaching a first year Computer Science uni course in which we introduce students to git as an essential version control tool. For this, we leverage GitHub Classroom to generate all student GitHub repositories for their projects.

However, a lot of students take the easy road (who would have thought that, right? ;-)) and submit commits using the GitHub web interface, avoiding learning git CLI commands.

Our goal is to force our students to use git CLI commands instead of using the GitHub interface. To this end, I've looked into various options to automatically undo all web interface commits (these commits are distinguishable through GitHub's official GPG signature):

  • Adding a GitHub workflow
  • Adding a GitHub app
  • Adding a GitHub bot

Unfortunately, non of these options led to a viable solution. So my question remains: how can we automatically undo all web interface commits in a GitHub repository?

0

There are 0 answers