How to deal with student putting their (home)work on github
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.