I use codebasehq.com and religiously create separate tickets for each commit/"feature" (commit logs look like: "[completed: 1234] Added feature X.")
The reason behind this is that I might go for a few weeks without even looking at the code and then when I come back to it it's like picking up someone else's work...
I also have boatloads of unit tests so that I don't have to be as terrified about making big sweeping changes, and try to add tests along with every "feature" I put in.
This might sound backwards, but sometimes I do my best work after I decide I'm not going to do anything that day.
I go outside and walk around and just think, day dream, brainstorm. Almost always, I'll start thinking about "work" in some form and will end up dying to get back to it. I'm usually incredibly productive when I get into this mindset.
I turned this into a "hack" by waking up early (7AM) and deciding that I'm not going to do any work until noon -- just spend some time outside. By 9AM I'm usually itching to crank on something.
(This doesn't work for me if you watch movies or TV during your "thinking time"... you have to be alone with just your thoughts...)