Motivation
Known as the Boy Scout Rule, (possibly) first introduced by the Boy Scouts of America. This simple rule that works great for camping in nature can also be applied to programming: when you're done with a task, always check in code in a cleaner state than when you checked it out.
Applicability
This should be daily routine for a software engineer. Make sure you do not pollute your regular commits with clean up actions.