How to deal with student putting their (home)work on github While using github for source code is generally something I love to encourage, if a student puts their (computer science) homework there, it's generally easy for others to find and copy - which creates a temptation to use it as a "baseline" for their own (identical in most cases) homework - while I understand the benefits of using github (versioning, transitioning across machines easily, teamwork-capabilities), and the individual student who is using it has verified that it is indeed their account and can explain the code well, I still feel uncomfortable with it.

Has anyone else dealt with this issue? how did you handle it? does the university have some sort of policy around publishing student-created work openly? (even if it is part of an assignment)? 

As a side-note, my general policy regarding "very similar" assignments is that whomever submitted it first gets the points, and the other submissions do not receive any points, however I tend to ask the students to explain their code and how it works, why they chose X over Y, etc. in such cases first. 

edit: I have been informed that there does exist a free version of github that students can use to host private repositories, and this is likely the course of action I will go with for the near future, however, there are several drawbacks:


The student will be unable to showcase their work (i.e. a link to their github on their resume)
The student will not be a student forever, and thus the repository won't be able to be private for free indefinitely
I have very little control (and interest in policing it) once the class is over, so the student could decide to make the repository public once the class is over.
Give students assignments where their work must address one of their personal interests.  For example, instead of having every student program pizza maker, have each student program a machine to make their favorite food.  This will make copy-and-paste cheating more difficult.  It will also make students more interested and make your grading more interesting.