The problem with doing this, besides being incredibly unprofessional, is that it won't really affect the company much - besides reducing productivity for a little while - however it will annoy the hell out of your previous colleagues. Unless you're leaving because you fell out with your colleagues, I doubt it would have the desired effect.
Yeah everyone would notice it around the same time, look at recent commits, see some silly file got committed and revert. You'd have to have a team of pretty sub-par devs to not undo this fairly quickly. Although it would be sort of annoying for a couple of hours. In fact if you left on really good terms and were still great friends with the team, something like this might be more of a silly prank than anything truly malicious.