I know several professors that attempt this. The work-around is pretty trivial though: just cheat as usual, then claim you forgot to commit until you were already done. The best the professor can really do in those cases is dock the kids a letter-grade or so (oh noes, a B!), since forgetting to commit is at least somewhat plausible for students unused to version control, and certainly isn't strong evidence of cheating.
Of course the really bad cheaters are still caught, but through the tried and true method of comparing code and looking for students that don't understand their own code.