I spend a significant chunk of my work day writing code. Some of that is building new features, some of it is fixing bugs, and still more of it is going back to refactor something I sloppily threw together earlier. I’m doing a lot of different things, and it’s often hard to remember them all.
Luckily, Git forces me to leave a log message about what I’ve changed with each commit. It’s a good audit trail. If anything ever goes wrong, we can usually roll back through the Git commit logs and easily figure out the likely culprit.
But commit messages represent something more than just a way to make code rollbacks easier. They’re also a pretty useful document of how I spent my time. Reviewing the contents of
git log is pretty clunky, so we just added a way to easily import your git commit messages into RescueTime Premium as highlight events.
Adding commit logs to my Highlights stream helps me understand my software development time better. Was I working on the right things? Did the amount of time I spent coding that day really make sense compared to what I actually checked in? When I get really busy, work becomes a blur, so it’s nice to have an easy list to review at the end of the week and remind me that, yes, I actually did accomplish some stuff. 🙂
They’re also really useful alongside the rest of my highlight events, so I can see how all my activities are lining up and if I’m neglecting anything. I use different labels to group commits for different projects, so I can see how often I’m committing code for the RescueTime web site, the browser extension, or any of our other projects.
How to log your own Git commits as RescueTime Highlights:
- Make sure you have RescueTime Premium. You will need it to post highlights.
- Go to our Git integration page and generate a post-commit hook file. You can customize the highlight label (‘code commit’ vs. ‘website project commit’, vs. etc…), and choose whether or not to ignore commit messages less than 20 characters. I do this so I can skip over commit messages like “oops, typo”.
- Save the generated file in your Git project’s .git/hooks directory
- Give the file executable permissions (
chmod +x post-commit)
That’s it! All future commits will automatically be logged as highlight events in RescueTime and will show up on your dashboard and the weekly email reports. It’s just one more way you can save yourself some typing and still keep a rich record of your accomplishments.
What do you think?