I personaly prefer to stash code (with a comment, for instance `git stash create "Enable immersive mode on KitKat"`) than commit a commented snippet (even if it's going to go live), or maybe branch it (local only) if it's a big one